umar456 · GitHub

Conversation

umar456

umar456 previously approved these changes Dec 6, 2018

}

TEST(Scan, ExclusiveSum1D) {
const int block_work_size = 6912;

@mark-poscablo

pavanky

Binary<To, op> binop;
To accum = tptr[blockIdx_x - 1];


@mark-poscablo 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

Dec 18, 2018

@mark-poscablo 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

Dec 18, 2018

umar456

}

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

Mark Poscablo added 7 commits

December 20, 2018 07:11

Mark Poscablo

Mark Poscablo

Mark Poscablo

Mark Poscablo

Mark Poscablo

Mark Poscablo

Mark Poscablo

… to loop initialization.

@mark-poscablo

@umar456

9prady9 pushed a commit to 9prady9/arrayfire that referenced this pull request

Mar 27, 2019
Fix 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, 2019
Fix output indices on broadcast step of 1D exclusive scan in CUDA
(cherry picked from commit  70be3d4 )

Labels

None yet

Read the original on github.com ↗