12 #ifndef CXVNNCLALGORITHM_H_ 13 #define CXVNNCLALGORITHM_H_ 16 #define __CL_ENABLE_EXCEPTIONS //telling the opencl c++ wrapper to throw exceptions 19 #include "OpenCLManager.hpp" 20 #include "RuntimeMeasurementManager.hpp" 61 virtual bool initCL(QString kernelFile,
67 float brightnessWeight,
83 std::string kernelPath,
89 float brightnessWeight,
153 void setKernelArguments(
158 float volume_xspacing,
159 float volume_yspacing,
160 float volume_zspacing,
165 std::vector<cl::Buffer>& blocks,
166 cl::Buffer out_volume,
167 cl::Buffer plane_matrices,
169 size_t plane_eqs_size,
170 size_t close_planes_size,
172 size_t calculateSpaceNeededForClosePlanes(cl::Kernel kernel, cl::Device device,
size_t local_work_size,
size_t nPlanes_numberOfInputImages,
int nClosePlanes);
173 bool isUsingTooMuchMemory(
size_t outputVolumeSize,
size_t inputBlocksLength, cl_ulong globalMemUse);
174 void measureAndExecuteKernel(cl::CommandQueue queue, cl::Kernel kernel,
size_t global_work_size,
size_t local_work_size, std::string measurementName);
175 void measureAndReadBuffer(cl::CommandQueue queue, cl::Buffer outputBuffer,
size_t outputVolumeSize,
void *outputData, std::string measurementName);
177 void startProfiling(std::string name, cl::CommandQueue queue);
178 void stopProfiling(std::string name, cl::CommandQueue queue);
181 oul::ContextPtr mOulContex;
182 oul::RuntimeMeasurementsManagerPtr mRuntime;
183 std::set<std::string> mMeasurementNames;
184 std::string mKernelMeasurementName;
virtual bool initCL(QString kernelFile, int nMaxPlanes, int nPlanes, int method, int planeMethod, int nStarts, float brightnessWeight, float newnessWeight)
struct cx::VNNclAlgorithm::__frameBlock_t frameBlock_t
double getTotalExecutionTime()
virtual void fillPlaneMatrices(float *planeMatrices, ProcessedUSInputDataPtr input)
virtual cl::Program buildCLProgram(std::string program_src, std::string kernelPath, int nMaxPlanes, int nPlanes, int method, int planeMethod, int nStarts, float brightnessWeight, float newnessWeight)
virtual bool reconstruct(ProcessedUSInputDataPtr input, vtkImageDataPtr outputData, float radius, int nClosePlanes)
virtual bool initializeFrameBlocks(frameBlock_t *framePointers, int numBlocks, ProcessedUSInputDataPtr inputFrames)
void setProfiling(bool on)
boost::shared_ptr< class ProcessedUSInputData > ProcessedUSInputDataPtr
virtual void freeFrameBlocks(frameBlock_t *framePointers, int numBlocks)
boost::shared_ptr< VNNclAlgorithm > VNNclAlgorithmPtr
double getKernelExecutionTime()
Namespace for all CustusX production code.