diff --git a/opencl_fdfd/ops.py b/opencl_fdfd/ops.py index dd39e45..7d51e58 100644 --- a/opencl_fdfd/ops.py +++ b/opencl_fdfd/ops.py @@ -224,3 +224,35 @@ def create_dot(context): return g.get() return ri_update + + +def create_a_csr(context): + spmv_source = ''' + int start = m_row_ptr[i]; + int stop = m_row_ptr[i+1]; + cdouble_t dot = cdouble_new(0.0, 0.0); + + int col_ind, d_ind; + for (int j=start; j