Skip to content

Commit

Permalink
Merge pull request #535 from jvesely/as-cast-fix
Browse files Browse the repository at this point in the history
pygpu: Don't change addres space when casting pointer.
  • Loading branch information
abergeron authored Sep 19, 2017
2 parents 2e73170 + 9954502 commit 4461ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygpu/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 4461ad8

Please sign in to comment.