opencl questions !!

hello .

open cl is something new for me and i need some guide line and advice to start using it is and i have some questions i need to post theme .

1- Direct3D11 is my main render library in window so my question is :
is that possible to use direct3D11 & opencl together ??

2-is it possible to use opencl without any other library (like directx or opengl )??

3-is opencl run both at nvidia & ati GPUs without any change in the code ( write once run any gpus ) ???

thank you !

is that possible to use direct3D11 & opencl together

Yes. You can share textures and buffers between OpenCL and DirectX if your OpenCL implementation supports the cl_nv_d3d11_sharing extension.

is it possible to use opencl without any other library (like directx or opengl )?

Yes. OpenCL is a standalone API.

is opencl run both at nvidia & ati GPUs without any change in the code ( write once run any gpus ) ?

It’s possible to do that if you write your code in portable OpenCL. Developers frequently tune their code differently for various devices to maximize performance.

thank you

It’s possible to do that if you write your code in portable OpenCL.

just one brisk question: do i have to write precisly in portable version to be able to run at both gpus? or i can open it in regular version installed on another pc?

There is no any special portable version. Any CORRECT OpenCL code will compile and run at compatible OpenCL device. The point here is about performance. Some developers make special versions of kernels for different set of OpenCL devices (for example, some kernels have two versions - one for CPUs and another for GPUs).