Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
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
:
40
42
OpenCLVectorBase
(
const
std::size_t elemSize );
43
47
OpenCLVectorBase
(
const
std::size_t elemSize,
const
OpenCLVectorBase
& other );
48
51
~OpenCLVectorBase
();
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
84
OpenCLContext
*
GetContext
()
const
;
85
87
cl_mem
GetKernelArgument
()
const
;
88
89
protected
:
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 */
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:139
itk::OpenCLMemoryObject::Access
Access
Definition:
itkOpenCLMemoryObject.h:83
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:92
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:91
itk::OpenCLVectorBase::m_Mapped
void * m_Mapped
Definition:
itkOpenCLVectorBase.h:94
itk::OpenCLVectorBase::m_Size
std::vcl_size_t m_Size
Definition:
itkOpenCLVectorBase.h:93
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:31
itkOpenCLMemoryObject.h
itk
Definition:
itkAdvancedImageToImageMetric.h:42
Generated on 1667476801 for elastix by
1.9.4