Skip to content

Commit 4461ad8

Browse files
author
abergeron
authored
Merge pull request #535 from jvesely/as-cast-fix
pygpu: Don't change addres space when casting pointer.
2 parents 2e73170 + 9954502 commit 4461ad8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygpu/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def _generate_kernel(ctx, cols, upper=True):
66
tmpl = Template("""
77
#include "cluda.h"
88
KERNEL void extract_tri(GLOBAL_MEM ga_float *a, ga_size a_off, ga_uint N) {
9-
a = (GLOBAL_MEM ga_float *)(((char *)a) + a_off);
9+
a = (GLOBAL_MEM ga_float *)(((GLOBAL_MEM char *)a) + a_off);
1010
unsigned int idx = GID_1 * LDIM_0 * GDIM_0 +
1111
GID_0 * LDIM_0 + LID_0;
1212
unsigned int ix = idx/${cols};

0 commit comments

Comments
 (0)