Skip to content

USM allocation template

Wei, Jimmy T edited this page Mar 10, 2023 · 1 revision

USM allocation template

Prefer using the template for malloc_shared, malloc_device​

  • Verbose SYCL style:​
float *p = (float*)malloc_shared(N*sizeof(float),q);​
  • Simplified DPC++ style:​
float *p = malloc_shared<float>(N,q);
Clone this wiki locally