Commit fa3329a0 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Make Projector class slightly more generic

parent 005f7225
Pipeline #55023 failed with stage
in 31 seconds
......@@ -13,6 +13,9 @@ class Projector:
A class for performing a tomographic projection (Radon Transform) using Cuda.
"""
_projector_name = "joseph_projector"
_projector_signature = "PiiPfPPPPiiifii"
def __init__(
self,
slice_shape,
......@@ -108,13 +111,13 @@ class Projector:
def _compile_kernels(self):
self.gpu_projector = CudaKernel(
"proj",
self._projector_name,
filename=get_cuda_srcfile("proj.cu"),
)
self.texref_slice = self.gpu_projector.module.get_texref("texSlice")
self.texref_slice.set_array(self.d_image_cua)
self.texref_slice.set_filter_mode(cuda.filter_mode.LINEAR)
self.gpu_projector.prepare("PiiPfPPPPiiifii", [self.texref_slice])
self.gpu_projector.prepare(self._projector_signature, [self.texref_slice])
self.kernel_args = (
self.d_sino.gpudata,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment