Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
clrandom: Use vector store instead of vstore4--unnecessary, and pocl …
…doesn't like it
  • Loading branch information
inducer committed Aug 20, 2015
1 parent 2f284bd commit 74d3253
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pyopencl/clrandom.py
Expand Up @@ -257,9 +257,8 @@ def get_gen_kernel(self, dtype, distribution="uniform"):
unsigned long idx = get_global_id(0)*4;
while (idx + 4 < out_size)
{
vstore4(
GET_RANDOM_NUM(RANLUX_FUNC(&ranluxclstate)),
idx >> 2, output);
*(global output_vec_t *) (output + idx) =
GET_RANDOM_NUM(RANLUX_FUNC(&ranluxclstate));
idx += 4*NUM_WORKITEMS;
}
Expand All @@ -282,7 +281,7 @@ def get_gen_kernel(self, dtype, distribution="uniform"):
"output_t": c_type,
"num_work_items": self.num_work_items,
"rng_expr": rng_expr
}
}

prg = cl.Program(self.context, src).build()
knl = prg.generate
Expand Down Expand Up @@ -367,7 +366,7 @@ def get_sync_kernel(self):
}
""" % {
"defines": self.generate_settings_defines(),
}
}
prg = cl.Program(self.context, src).build()
return prg.sync

Expand Down

0 comments on commit 74d3253

Please sign in to comment.