From 5d647cf9a6159afd2933da594b9c79ad93d3cd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Mon, 23 Dec 2019 13:45:09 +0100 Subject: New upstream version 0.12.0~b0+dfsg --- silx/resources/opencl/sparse.cl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'silx/resources/opencl') 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 -- cgit v1.2.3