| 163 | |
| 164 | template<typename T, af_op_t op> |
| 165 | void ssArithCSR(Param oVals, Param oColIdx, const Param oRowIdx, const uint M, |
| 166 | const uint N, unsigned nnzA, const Param lVals, |
| 167 | const Param lRowIdx, const Param lColIdx, unsigned nnzB, |
| 168 | const Param rVals, const Param rRowIdx, const Param rColIdx) { |
| 169 | const T iden_val = |
| 170 | (op == af_mul_t || op == af_div_t ? scalar<T>(1) : scalar<T>(0)); |
| 171 | |
| 172 | auto arithOp = fetchKernel<T, op>( |
| 173 | "ssarith_csr", sp_sp_arith_csr_cl_src, |
| 174 | {DefineKeyValue(IDENTITY_VALUE, scalar_to_option(iden_val))}); |
| 175 | |
| 176 | cl::NDRange local(256, 1); |
| 177 | cl::NDRange global(divup(M, local[0]) * local[0], 1, 1); |
| 178 | |
| 179 | arithOp(cl::EnqueueArgs(getQueue(), global, local), *oVals.data, |
| 180 | *oColIdx.data, *oRowIdx.data, M, N, nnzA, *lVals.data, |
| 181 | *lRowIdx.data, *lColIdx.data, nnzB, *rVals.data, *rRowIdx.data, |
| 182 | *rColIdx.data); |
| 183 | CL_DEBUG_FINISH(getQueue()); |
| 184 | } |
| 185 | } // namespace kernel |
| 186 | } // namespace opencl |
| 187 | } // namespace arrayfire |
nothing calls this directly
no test coverage detected