From 8188b0697751d7c7ec6fe3069d0fceb50ebd0c9e Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 2 Oct 2014 13:42:42 +0200 Subject: Improve cuda 2d header comments --- cuda/2d/algo.h | 7 +++++++ cuda/2d/dims.h | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'cuda/2d') diff --git a/cuda/2d/algo.h b/cuda/2d/algo.h index 96195a3..9f2aa00 100644 --- a/cuda/2d/algo.h +++ b/cuda/2d/algo.h @@ -74,6 +74,13 @@ public: // instead of calling setBuffers, you can also call allocateBuffers // to let ReconAlgo manage its own GPU memory virtual bool allocateBuffers(); + + // copy data to GPU. This must be called after allocateBuffers. + // pfSinogram, pfReconstruction, pfVolMask, pfSinoMask are the + // sinogram, reconstruction, volume mask and sinogram mask in system RAM, + // respectively. The corresponding pitch variables give the pitches + // of these buffers, measured in floats. + // The sinogram is multiplied by fSinogramScale after uploading it. virtual bool copyDataToGPU(const float* pfSinogram, unsigned int iSinogramPitch, float fSinogramScale, const float* pfReconstruction, unsigned int iReconstructionPitch, const float* pfVolMask, unsigned int iVolMaskPitch, diff --git a/cuda/2d/dims.h b/cuda/2d/dims.h index df349f7..3978eab 100644 --- a/cuda/2d/dims.h +++ b/cuda/2d/dims.h @@ -44,12 +44,29 @@ struct SFanProjection { struct SDimensions { + // Width, height of reconstruction volume unsigned int iVolWidth; unsigned int iVolHeight; + + // Number of projection angles unsigned int iProjAngles; + + // Number of detector pixels unsigned int iProjDets; - float fDetScale; // size of detector compared to volume pixels + + // size of detector compared to volume pixels + float fDetScale; + + // in FP, number of rays to trace per detector pixel. + // This should usually be set to 1. + // If fDetScale > 1, this should be set to an integer of roughly + // the same size as fDetScale. unsigned int iRaysPerDet; + + // in BP, square root of number of rays to trace per volume pixel + // This should usually be set to 1. + // If fDetScale < 1, this should be set to an integer of roughly + // the same size as 1 / fDetScale. unsigned int iRaysPerPixelDim; }; -- cgit v1.2.3