summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/astra/CompositeGeometryManager.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/include/astra/CompositeGeometryManager.h b/include/astra/CompositeGeometryManager.h
index 6610151..18dd72f 100644
--- a/include/astra/CompositeGeometryManager.h
+++ b/include/astra/CompositeGeometryManager.h
@@ -50,9 +50,16 @@ class CProjectionGeometry3D;
class CProjector3D;
+struct SGPUParams {
+ std::vector<int> GPUIndices;
+ size_t memory;
+};
+
class _AstraExport CCompositeGeometryManager {
public:
+ CCompositeGeometryManager();
+
class CPart;
typedef std::list<boost::shared_ptr<CPart> > TPartList;
class CPart {
@@ -72,7 +79,9 @@ public:
bool uploadToGPU();
bool downloadFromGPU(/*mode?*/);
- virtual TPartList split(size_t maxSize, int div) = 0;
+ virtual void splitX(TPartList& out, size_t maxSize, size_t maxDim, int div) = 0;
+ 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();
@@ -86,7 +95,9 @@ public:
CVolumeGeometry3D* pGeom;
- virtual TPartList split(size_t maxSize, int div);
+ virtual void splitX(TPartList& out, size_t maxSize, size_t maxDim, int div);
+ 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);
@@ -100,7 +111,9 @@ public:
CProjectionGeometry3D* pGeom;
- virtual TPartList split(size_t maxSize, int div);
+ virtual void splitX(TPartList& out, size_t maxSize, size_t maxDim, int div);
+ 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);
@@ -130,6 +143,13 @@ public:
bool doJobs(TJobList &jobs);
+ SJob createJobFP(CProjector3D *pProjector,
+ CFloat32VolumeData3DMemory *pVolData,
+ CFloat32ProjectionData3DMemory *pProjData);
+ SJob createJobBP(CProjector3D *pProjector,
+ CFloat32VolumeData3DMemory *pVolData,
+ CFloat32ProjectionData3DMemory *pProjData);
+
// Convenience functions for creating and running a single FP or BP job
bool doFP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData,
CFloat32ProjectionData3DMemory *pProjData);
@@ -139,10 +159,19 @@ public:
bool doFP(CProjector3D *pProjector, const std::vector<CFloat32VolumeData3DMemory *>& volData, const std::vector<CFloat32ProjectionData3DMemory *>& projData);
bool doBP(CProjector3D *pProjector, const std::vector<CFloat32VolumeData3DMemory *>& volData, const std::vector<CFloat32ProjectionData3DMemory *>& projData);
+ void setGPUIndices(const std::vector<int>& GPUIndices);
+
+ static void setGlobalGPUParams(const SGPUParams& params);
+
protected:
bool splitJobs(TJobSet &jobs, size_t maxSize, int div, TJobSet &split);
+ std::vector<int> m_GPUIndices;
+ size_t m_iMaxSize;
+
+
+ static SGPUParams* s_params;
};
}