From d85a660f064e8130b27e11c7fd762221c754c315 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 26 Jan 2017 14:57:57 +0100 Subject: Start work on CFloat32Data3DGPU to allow persistent/external GPU memory --- include/astra/CompositeGeometryManager.h | 43 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'include/astra/CompositeGeometryManager.h') diff --git a/include/astra/CompositeGeometryManager.h b/include/astra/CompositeGeometryManager.h index c0acf4f..08eb7af 100644 --- a/include/astra/CompositeGeometryManager.h +++ b/include/astra/CompositeGeometryManager.h @@ -42,9 +42,9 @@ namespace astra { class CCompositeVolume; class CCompositeProjections; -class CFloat32Data3DMemory; -class CFloat32ProjectionData3DMemory; -class CFloat32VolumeData3DMemory; +class CFloat32Data3D; +class CFloat32ProjectionData3D; +class CFloat32VolumeData3D; class CVolumeGeometry3D; class CProjectionGeometry3D; class CProjector3D; @@ -77,7 +77,7 @@ public: PART_VOL, PART_PROJ } eType; - CFloat32Data3DMemory* pData; + CFloat32Data3D* pData; unsigned int subX; unsigned int subY; unsigned int subZ; @@ -88,8 +88,11 @@ public: virtual void splitY(TPartList& out, size_t maxSize, size_t maxDim, int div) = 0; virtual void splitZ(TPartList& out, size_t maxSize, size_t maxDim, int div) = 0; virtual CPart* reduce(const CPart *other) = 0; - virtual void getDims(size_t &x, size_t &y, size_t &z) = 0; - size_t getSize(); + virtual void getDims(size_t &x, size_t &y, size_t &z) const = 0; + size_t getSize() const; + + bool canSplitAndReduce() const; + bool isFull() const; }; class CVolumePart : public CPart { @@ -104,7 +107,7 @@ public: virtual void splitY(TPartList& out, size_t maxSize, size_t maxDim, int div); virtual void splitZ(TPartList& out, size_t maxSize, size_t maxDim, int div); virtual CPart* reduce(const CPart *other); - virtual void getDims(size_t &x, size_t &y, size_t &z); + virtual void getDims(size_t &x, size_t &y, size_t &z) const; CVolumePart* clone() const; }; @@ -120,7 +123,7 @@ public: virtual void splitY(TPartList& out, size_t maxSize, size_t maxDim, int div); virtual void splitZ(TPartList& out, size_t maxSize, size_t maxDim, int div); virtual CPart* reduce(const CPart *other); - virtual void getDims(size_t &x, size_t &y, size_t &z); + virtual void getDims(size_t &x, size_t &y, size_t &z) const; CProjectionPart* clone() const; }; @@ -150,23 +153,23 @@ public: bool doJobs(TJobList &jobs); SJob createJobFP(CProjector3D *pProjector, - CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData); + CFloat32VolumeData3D *pVolData, + CFloat32ProjectionData3D *pProjData); SJob createJobBP(CProjector3D *pProjector, - CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData); + CFloat32VolumeData3D *pVolData, + CFloat32ProjectionData3D *pProjData); // Convenience functions for creating and running a single FP or BP job - bool doFP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData); - bool doBP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData); - bool doFDK(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData, bool bShortScan, + bool doFP(CProjector3D *pProjector, CFloat32VolumeData3D *pVolData, + CFloat32ProjectionData3D *pProjData); + bool doBP(CProjector3D *pProjector, CFloat32VolumeData3D *pVolData, + CFloat32ProjectionData3D *pProjData); + bool doFDK(CProjector3D *pProjector, CFloat32VolumeData3D *pVolData, + CFloat32ProjectionData3D *pProjData, bool bShortScan, const float *pfFilter = 0); - bool doFP(CProjector3D *pProjector, const std::vector& volData, const std::vector& projData); - bool doBP(CProjector3D *pProjector, const std::vector& volData, const std::vector& projData); + bool doFP(CProjector3D *pProjector, const std::vector& volData, const std::vector& projData); + bool doBP(CProjector3D *pProjector, const std::vector& volData, const std::vector& projData); void setGPUIndices(const std::vector& GPUIndices); -- cgit v1.2.3