Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
Src
E
elastix
Common
OpenCL
ITKimprovements
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
21
#include "
itkOpenCLMemoryObject.h
"
22
23
namespace
itk
24
{
32
// Forward declaration
33
class
OpenCLContext;
34
class
OpenCLKernel;
35
class
OpenCLVectorBasePimpl;
36
37
class
ITKOpenCL_EXPORT
OpenCLVectorBase
38
{
39
protected
:
41
OpenCLVectorBase
(
const
std::size_t elemSize);
42
46
OpenCLVectorBase
(
const
std::size_t elemSize,
const
OpenCLVectorBase
& other);
47
50
~OpenCLVectorBase
();
51
53
void
54
Assign
(
const
OpenCLVectorBase
& other);
55
57
void
58
Create
(
OpenCLContext
* context,
const
OpenCLMemoryObject::Access
access,
const
std::size_t size);
59
61
void
62
Release
();
63
67
void
68
Map
();
69
72
void
73
Unmap
()
const
;
74
77
void
78
Read
(
void
* data,
const
std::size_t size,
const
std::size_t offset = 0);
79
82
void
83
Write
(
const
void
* data,
const
std::size_t size,
const
std::size_t offset = 0);
84
86
cl_mem
87
GetMemoryId
()
const
;
88
90
OpenCLContext
*
91
GetContext
()
const
;
92
94
cl_mem
95
GetKernelArgument
()
const
;
96
97
protected
:
98
OpenCLVectorBasePimpl *
d_ptr
;
99
std::size_t
m_ElementSize
;
100
std::size_t
m_Size
;
101
mutable
void
*
m_Mapped
;
102
104
friend
class
OpenCLKernel
;
105
};
106
107
}
// end namespace itk
108
109
#endif
/* itkOpenCLVectorBase_h */
itk::OpenCLContext
The OpenCLContext class represents an OpenCL context.
Definition
itkOpenCLContext.h:77
itk::OpenCLKernel
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
Definition
itkOpenCLKernel.h:136
itk::OpenCLMemoryObject::Access
Access
Definition
itkOpenCLMemoryObject.h:87
itk::OpenCLVectorBase
The base class for the OpenCLVector implementation.
Definition
itkOpenCLVectorBase.h:38
itk::OpenCLVectorBase::Release
void Release()
itk::OpenCLVectorBase::Assign
void Assign(const OpenCLVectorBase &other)
itk::OpenCLVectorBase::GetContext
OpenCLContext * GetContext() const
itk::OpenCLVectorBase::Create
void Create(OpenCLContext *context, const OpenCLMemoryObject::Access access, const std::vcl_size_t size)
itk::OpenCLVectorBase::m_ElementSize
std::vcl_size_t m_ElementSize
Definition
itkOpenCLVectorBase.h:99
itk::OpenCLVectorBase::~OpenCLVectorBase
~OpenCLVectorBase()
itk::OpenCLVectorBase::OpenCLVectorBase
OpenCLVectorBase(const std::vcl_size_t elemSize)
itk::OpenCLVectorBase::Write
void Write(const void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
itk::OpenCLVectorBase::Unmap
void Unmap() const
itk::OpenCLVectorBase::OpenCLVectorBase
OpenCLVectorBase(const std::vcl_size_t elemSize, const OpenCLVectorBase &other)
itk::OpenCLVectorBase::d_ptr
OpenCLVectorBasePimpl * d_ptr
Definition
itkOpenCLVectorBase.h:98
itk::OpenCLVectorBase::m_Mapped
void * m_Mapped
Definition
itkOpenCLVectorBase.h:101
itk::OpenCLVectorBase::m_Size
std::vcl_size_t m_Size
Definition
itkOpenCLVectorBase.h:100
itk::OpenCLVectorBase::Read
void Read(void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
itk::OpenCLVectorBase::GetKernelArgument
cl_mem GetKernelArgument() const
itk::OpenCLVectorBase::GetMemoryId
cl_mem GetMemoryId() const
itk::OpenCLVectorBase::Map
void Map()
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition
itkOpenCLExport.h:33
itkOpenCLMemoryObject.h
itk
Definition
itkAdvancedImageToImageMetric.h:43
Generated on 2024-07-17 for elastix by
1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d)