Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

Does the OpenCL2.0 SVM support allocate memory for images?

$
0
0

Does the OpenCL2.0 SVM support allocate memory for images?

We can test the SVM performance like:

d_a=(float*)clSVMAlloc(context,(CL_MEM_READ_WRITE|CL_MEM_SVM_FINE_GRAIN_BUFFER|CL_MEM_SVM_ATOMICS),size,0);

d_b=(float*)clSVMAlloc(context,(CL_MEM_READ_WRITE|CL_MEM_SVM_FINE_GRAIN_BUFFER|CL_MEM_SVM_ATOMICS),size,0);

d_c=(float*)clSVMAlloc(context,(CL_MEM_READ_WRITE|CL_MEM_SVM_FINE_GRAIN_BUFFER|CL_MEM_SVM_ATOMICS),size,0);

for(int i=0;i<size;i++)

{

   d_a[i]=Initial_value;

   d_b[i]=Initial_value;

}

clSetKernelArgSVMPointer(kernel, 0, d_a);

clSetKernelArgSVMPointer(kernel, 0, d_b);

clSetKernelArgSVMPointer(kernel, 0, d_c);



The SVM performance has been verified good in the example of calculation of a vector,but the clSVMAlloc() cannot allocate memory for images,

how should we do to utilize the SVM for image processing?

Thank you!

The test device is like:

        CL_DEVICE_NAME: Genuine Intel(R) CPU 0000 @ 1.60GHz

        CL_DEVICE_VENDOR:       Intel(R) Corporation

        CL_DRIVER_VERSION:      4.0.0.8228

        CL_DEVICE_PROFILE:      FULL_PROFILE

        CL_DEVICE_VERSION:      OpenCL 2.0 (Build 8228)

        CL_DEVICE_OPENCL_C_VERSION:     OpenCL C 2.0


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>