FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
OpenCLBufferAccess.hpp
Go to the documentation of this file.
1 #ifndef OPENCLBUFFERACCESS_HPP_
2 #define OPENCLBUFFERACCESS_HPP_
3 
4 #include "CL/OpenCL.hpp"
5 #include "FAST/Object.hpp"
6 
7 
8 namespace fast {
9 
10 class OpenCLDevice;
11 class DataObject;
12 
13 class FAST_EXPORT OpenCLBufferAccess {
14  public:
15  cl::Buffer* get() const;
16  OpenCLBufferAccess(cl::Buffer* buffer, std::shared_ptr<DataObject> dataObject);
17  void release();
19  typedef std::unique_ptr<OpenCLBufferAccess> pointer;
20  private:
22  OpenCLBufferAccess& operator=(const OpenCLBufferAccess& other);
23  cl::Buffer* mBuffer;
24  bool mIsDeleted;
25  std::shared_ptr<DataObject> mDataObject;
26 };
27 
28 } // end namespace fast
29 
30 #endif
Object.hpp
fast
Definition: AffineTransformation.hpp:7
fast::OpenCLBufferAccess
Definition: OpenCLBufferAccess.hpp:13
fast::OpenCLBufferAccess::pointer
std::unique_ptr< OpenCLBufferAccess > pointer
Definition: OpenCLBufferAccess.hpp:19