Loading...
Searching...
No Matches
itkOpenCLVectorBase.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkOpenCLVectorBase_h
#define itkOpenCLVectorBase_h
#include "itkOpenCLMemoryObject.h"
namespace itk
{
// Forward declaration
class OpenCLContext;
class OpenCLKernel;
class OpenCLVectorBasePimpl;
class ITKOpenCL_EXPORT OpenCLVectorBase
{
protected:
OpenCLVectorBase(const std::size_t elemSize);
OpenCLVectorBase(const std::size_t elemSize, const OpenCLVectorBase & other);
~OpenCLVectorBase();
void
Assign(const OpenCLVectorBase & other);
void
Create(OpenCLContext * context, const OpenCLMemoryObject::Access access, const std::size_t size);
void
Release();
void
Map();
void
Unmap() const;
void
Read(void * data, const std::size_t size, const std::size_t offset = 0);
void
Write(const void * data, const std::size_t size, const std::size_t offset = 0);
cl_mem
GetMemoryId() const;
OpenCLContext *
GetContext() const;
cl_mem
GetKernelArgument() const;
protected:
OpenCLVectorBasePimpl * d_ptr;
std::size_t m_ElementSize;
std::size_t m_Size;
mutable void * m_Mapped;
friend class OpenCLKernel;
};
} // end namespace itk
#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::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::OpenCLKernel
friend class OpenCLKernel
Definition itkOpenCLVectorBase.h:104
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 1768596610 for elastix by 1.15.0 |