Fix memory corruption bug (overshoot in colorclip)

This commit is contained in:
Steven Robertson
2011-10-25 15:43:05 -04:00
parent efc2ac23e2
commit be31708c09
2 changed files with 5 additions and 5 deletions

View File

@ -338,7 +338,7 @@ class Animation(object):
color_fun = self.mod.get_function("colorclip")
blocks = int(np.ceil(np.sqrt(nbins / 256)))
color_fun(d_out, gam, vib, hipow, lin, lingam, bkgd,
color_fun(d_out, gam, vib, hipow, lin, lingam, bkgd, np.int32(nbins),
block=(256, 1, 1), grid=(blocks, blocks),
stream=filt_stream)
cuda.memcpy_dtoh_async(h_out, d_out, filt_stream)