diff --git a/pygpu/basic.py b/pygpu/basic.py index 51b92c5cc4..e054daade0 100644 --- a/pygpu/basic.py +++ b/pygpu/basic.py @@ -6,7 +6,7 @@ def _generate_kernel(ctx, cols, upper=True): tmpl = Template(""" #include "cluda.h" KERNEL void extract_tri(GLOBAL_MEM ga_float *a, ga_size a_off, ga_uint N) { - a = (GLOBAL_MEM ga_float *)(((char *)a) + a_off); + a = (GLOBAL_MEM ga_float *)(((GLOBAL_MEM char *)a) + a_off); unsigned int idx = GID_1 * LDIM_0 * GDIM_0 + GID_0 * LDIM_0 + LID_0; unsigned int ix = idx/${cols};