Medical Imaging Interaction Toolkit  2018.4.99-a28b433c
Medical Imaging Interaction Toolkit
mitkOclBaseData.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkOclBaseData.h"
14 
16 : m_BufferSize ( 0 ), m_GPUBuffer( nullptr ), m_CPUBuffer( nullptr )
17 {
18 }
19 
21 {
22  if (m_GPUBuffer) clReleaseMemObject( m_GPUBuffer );
23  if (m_CPUBuffer) free( m_CPUBuffer );
24 }
25 
27 {
28  return this->m_GPUBuffer;
29 }
virtual ~OclBaseData()
Default destructor.
virtual cl_mem GetGPUBuffer()
Get the pointer to the buffer on the device (GPU)
OclBaseData()
Default constructor.