go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkOpenCLVectorBase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef __itkOpenCLVectorBase_h
19#define __itkOpenCLVectorBase_h
20
22
23namespace itk
24{
32// Forward declaration
33class OpenCLContext;
34class OpenCLKernel;
35class OpenCLVectorBasePimpl;
36
38{
39protected:
40
42 OpenCLVectorBase( const std::size_t elemSize );
43
47 OpenCLVectorBase( const std::size_t elemSize, const OpenCLVectorBase & other );
48
52
54 void Assign( const OpenCLVectorBase & other );
55
57 void Create( OpenCLContext * context,
58 const OpenCLMemoryObject::Access access, const std::size_t size );
59
61 void Release();
62
66 void Map();
67
70 void Unmap() const;
71
74 void Read( void * data, const std::size_t size, const std::size_t offset = 0 );
75
78 void Write( const void * data, const std::size_t size, const std::size_t offset = 0 );
79
81 cl_mem GetMemoryId() const;
82
85
87 cl_mem GetKernelArgument() const;
88
89protected:
90
91 OpenCLVectorBasePimpl * d_ptr;
92 std::size_t m_ElementSize;
93 std::size_t m_Size;
94 mutable void * m_Mapped;
95
97 friend class OpenCLKernel;
98};
99
100} // end namespace itk
101
102#endif /* __itkOpenCLVectorBase_h */
The OpenCLContext class represents an OpenCL context.
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
The base class for the OpenCLVector implementation.
void Assign(const OpenCLVectorBase &other)
OpenCLContext * GetContext() const
void Create(OpenCLContext *context, const OpenCLMemoryObject::Access access, const std::vcl_size_t size)
std::vcl_size_t m_ElementSize
OpenCLVectorBase(const std::vcl_size_t elemSize)
void Write(const void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
OpenCLVectorBase(const std::vcl_size_t elemSize, const OpenCLVectorBase &other)
OpenCLVectorBasePimpl * d_ptr
void Read(void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
cl_mem GetKernelArgument() const
cl_mem GetMemoryId() const
#define ITKOpenCL_EXPORT


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo