Conversation
umar456 previously approved these changes Dec 6, 2018
| } | ||
|
|
||
| TEST(Scan, ExclusiveSum1D) { | ||
| const int block_work_size = 6912; |
mark-poscablo
changed the title
Fix output indices on broadcast step of 1D exclusive scan in CUDA
Fix output indices on broadcast step of exclusive scan in CUDA
mark-poscablo
changed the title
Fix output indices on broadcast step of exclusive scan in CUDA
Fix output indices on broadcast step of exclusive scan
| } | ||
|
|
||
| template<typename To, af_op_t op, int dim> | ||
| template<typename To, af_op_t op, int dim, bool inclusive_scan> |
| const int wid = (blockIdx.y + blockIdx.z * gridDim.y) / blocks_y; | ||
| const int blockIdx_x = blockIdx.x - (blocks_x) * zid; | ||
| const int blockIdx_y = (blockIdx.y + blockIdx.z * gridDim.y) - (blocks_y) * wid; | ||
| const int blockIdx_x = blockIdx.x - (blocks_x)*zid; |
| int offset = !inclusive_scan; | ||
| for (int k = 0, id = xid; | ||
| k < lim && id < oInfo.dims[0]; | ||
| k < lim && id + offset < oInfo.dims[0]; |
| int offset = !inclusive_scan; | ||
| for (int k = 0, id = xid; | ||
| k < lim && id < out.dims[0]; | ||
| k < lim && id + offset < out.dims[0]; |
Mark Poscablo added 7 commits
December 20, 2018 07:11
… to loop initialization.
9prady9 pushed a commit to 9prady9/arrayfire that referenced this pull request
Mar 27, 2019Fix output indices on broadcast step of 1D exclusive scan in CUDA (cherry picked from commit 70be3d4 )
umar456 pushed a commit that referenced this pull request
Apr 17, 2019Fix output indices on broadcast step of 1D exclusive scan in CUDA (cherry picked from commit 70be3d4 )
Labels
None yet