slm: OpenCL code base
0.1
|
Map channel connectivity such as channel heads, confluences, downstream pixels. More...
Functions | |
__kernel void | map_channel_heads (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array) |
Map provisional channel heads, even including those not on an IS_THINCHANNEL pixel and thus extraneous. More... | |
__kernel void | prune_channel_heads (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array) |
Keep only those provisional channel heads that lie on the 'thin channel' skeletonized network and have only one such thin channel pixel neighbor. More... | |
__kernel void | connect_channels (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array) |
Connect up channel strands by designating intervening pixels as channel pixels. More... | |
__kernel void | push_to_exit (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array) |
Connect up dangling channels to the masked grid boundary. More... | |
__kernel void | count_downchannels (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array, __global uint *count_array, __global uint *link_array) |
REVISE? Integrate downstream from all channel heads until either a masked boundary pixel is reached or until a channel pixel with a non-zero count is reached. More... | |
__kernel void | link_hillslopes (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global uint *mapping_array, __global uint *count_array, __global uint *link_array) |
TBD. More... | |
__kernel void | label_confluences (__global const float2 *seed_point_array, __global const bool *mask_array, __global const float2 *uv_array, __global const float *slt_array, __global uint *mapping_array, __global const uint *count_array, __global const uint *link_array) |
Flag if a pixel IS_MAJORCONFLUENCE and if so flag which upstream pixel IS_MAJORINFLOW or IS_MINORINFLOW. More... | |
Map channel connectivity such as channel heads, confluences, downstream pixels.
__kernel void connect_channels | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array | ||
) |
Connect up channel strands by designating intervening pixels as channel pixels.
Compiled if KERNEL_CONNECT_CHANNELS is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
Definition at line 26 of file connect.cl.
__kernel void count_downchannels | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array, | ||
__global uint * | count_array, | ||
__global uint * | link_array | ||
) |
REVISE? Integrate downstream from all channel heads until either a masked boundary pixel is reached or until a channel pixel with a non-zero count is reached.
At each new pixel step, link the previous pixel to the current pixel. (Re)designate traversed pixels as 'thin channel' along the way.
Compiled if KERNEL_COUNT_DOWNCHANNELS is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
[in,out] | count_array | counter grid recording number of pixel steps downstream from dominant channel head (padded) |
[in,out] | link_array | link grid providing the grid array index of the next downstream pixel (padded) |
Definition at line 34 of file countlink.cl.
__kernel void label_confluences | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global const float * | slt_array, | ||
__global uint * | mapping_array, | ||
__global const uint * | count_array, | ||
__global const uint * | link_array | ||
) |
Flag if a pixel IS_MAJORCONFLUENCE and if so flag which upstream pixel IS_MAJORINFLOW or IS_MINORINFLOW.
Compiled if KERNEL_LABEL_CONFLUENCES is defined.
[in] | seed_point_array | (float2 *, RO): |
[in] | mask_array | (bool *, RO): |
[in] | uv_array | (float2 *, RO): |
[in] | slt_array | (uint *, RO): |
[in,out] | mapping_array | (uint *, RW): |
[in] | count_array | (uint *, RO): |
[in] | link_array | (uint *, RO): |
__kernel void link_hillslopes | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array, | ||
__global uint * | count_array, | ||
__global uint * | link_array | ||
) |
TBD.
Compiled if KERNEL_LINK_HILLSLOPES is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
[in,out] | count_array | counter grid recording number of pixel steps downstream from dominant channel head (padded) |
[in,out] | link_array | link grid providing the grid array index of the next downstream pixel (padded) |
Definition at line 166 of file countlink.cl.
__kernel void map_channel_heads | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array | ||
) |
Map provisional channel heads, even including those not on an IS_THINCHANNEL pixel and thus extraneous.
The latter are removed by prune_channel_heads().
Compiled if KERNEL_MAP_CHANNEL_HEADS is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
Definition at line 33 of file channelheads.cl.
__kernel void prune_channel_heads | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array | ||
) |
Keep only those provisional channel heads that lie on the 'thin channel' skeletonized network and have only one such thin channel pixel neighbor.
Also exclude any provisional channel head with any masked-pixel neighbors.
Compiled if KERNEL_PRUNE_CHANNEL_HEADS is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
Definition at line 130 of file channelheads.cl.
__kernel void push_to_exit | ( | __global const float2 * | seed_point_array, |
__global const bool * | mask_array, | ||
__global const float2 * | uv_array, | ||
__global uint * | mapping_array | ||
) |
Connect up dangling channels to the masked grid boundary.
Compiled if KERNEL_PUSH_TO_EXIT is defined.
[in] | seed_point_array | list of initial streamline point vectors, one allotted to each kernel instance |
[in] | mask_array | grid pixel mask (padded), with true = masked, false = good |
[in] | uv_array | flow unit velocity vector grid (padded) |
[in,out] | mapping_array | flag grid recording status of each pixel (padded) |
Definition at line 144 of file connect.cl.