summaryrefslogtreecommitdiff
path: root/silx/resources/opencl
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
committerPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
commit5d647cf9a6159afd2933da594b9c79ad93d3cd9b (patch)
tree2571025a602f68fc8933b01104dc712d41f84034 /silx/resources/opencl
parent654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff)
New upstream version 0.12.0~b0+dfsg
Diffstat (limited to 'silx/resources/opencl')
-rw-r--r--silx/resources/opencl/sparse.cl20
1 files changed, 15 insertions, 5 deletions
diff --git a/silx/resources/opencl/sparse.cl b/silx/resources/opencl/sparse.cl
index 29e09ad..c99a0e9 100644
--- a/silx/resources/opencl/sparse.cl
+++ b/silx/resources/opencl/sparse.cl
@@ -28,6 +28,16 @@
#error "Please define IMAGE_WIDTH parameter"
#endif
+#ifndef DTYPE
+ #error "Please define DTYPE parameter"
+#endif
+
+#ifndef IDX_DTYPE
+ #error "Please define IDX_DTYPE parameter"
+#endif
+
+
+
/**
* Densify a matric from CSR format to "dense" 2D format.
* The input CSR data consists in 3 arrays: (data, ind, iptr).
@@ -43,10 +53,10 @@
**/
kernel void densify_csr(
- const global float* data,
- const global int* ind,
- const global int* iptr,
- global float* output,
+ const global DTYPE* data,
+ const global IDX_DTYPE* ind,
+ const global IDX_DTYPE* iptr,
+ global DTYPE* output,
int image_height
)
{
@@ -54,7 +64,7 @@ kernel void densify_csr(
uint row_idx = get_global_id(1);
if ((tid >= IMAGE_WIDTH) || (row_idx >= image_height)) return;
- local float line[IMAGE_WIDTH];
+ local DTYPE line[IMAGE_WIDTH];
// Memset
//~ #pragma unroll