Exemplo n.º 1
0
/*! \brief Releases this Program.
  *
  * Removes and destroys also all Kernel objects.
*/
void ocl::Program::release()
{
    if(this->isBuilt()){
        removeKernels();
        OPENCL_SAFE_CALL( clReleaseProgram (_id));

    }
    _context = 0;
    _id = 0;
}
Exemplo n.º 2
0
/*! \brief Destructs this Program.*/
ocl::Program::~Program()
{

	if(_context != nullptr)
		_context->release(this);

	removeKernels();
	this->release();
	_context = 0;
	_id = 0;
}