Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkOclBaseData.h"
18 
20 : m_BufferSize ( NULL ), m_GPUBuffer( NULL ), m_CPUBuffer( NULL )
21 {
22 }
23 
25 {
26  if (m_GPUBuffer) clReleaseMemObject( m_GPUBuffer );
27  if (m_CPUBuffer) free( m_CPUBuffer );
28 }
29 
31 {
32  return this->m_GPUBuffer;
33 }
virtual ~OclBaseData()
Default destructor.
virtual cl_mem GetGPUBuffer()
Get the pointer to the buffer on the device (GPU)
OclBaseData()
Default constructor.