Skip to content

Commit

Permalink
Use self.allocate_texture() in projector
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepaleo committed Nov 4, 2024
1 parent 40588c3 commit fd49dbf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/silx/opencl/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,8 @@ def allocate_slice(self):
self.add_to_cl_mem({"d_slice": ary})

def allocate_textures(self):
self.d_image_tex = pyopencl.Image(
self.ctx,
mf.READ_ONLY | mf.USE_HOST_PTR,
pyopencl.ImageFormat(
pyopencl.channel_order.INTENSITY, pyopencl.channel_type.FLOAT
),
hostbuf=np.ascontiguousarray(self._tmp_extended_img.T),
)
hostbuf = np.ascontiguousarray(self._tmp_extended_img.T)
self.d_image_tex = self.allocate_texture(hostbuf.shape, hostbuf)

def transfer_to_texture(self, image):
image2 = image
Expand Down

0 comments on commit fd49dbf

Please sign in to comment.