Ejemplo n.º 1
0
/* Print code for clearing the device after execution of the transformed code.
 * In particular, free the memory that was allocated on the device.
 */
static __isl_give isl_printer *clear_device(__isl_take isl_printer *p,
	struct gpu_prog *prog)
{
	p = unbind_device_textures_surfaces(p, prog);
	p = free_cuda_array(p,prog);
	p = free_device_arrays(p, prog);
	return p;
}
Ejemplo n.º 2
0
void ScaleSpaceFilter<GROUP_T, IMAGE_T>::free_array(ARRAY_T*& arr) {
  PROFILE_PUSH_RANGE("ScaleSpaceFilter::free_array()", 2);

#if defined(VMDCUDA)
  if (use_cuda) {
    free_cuda_array(arr);
  } else 
#endif
  {
    delete [] arr;
  }

  PROFILE_POP_RANGE();

  arr = NULL;
}