Thank you for your advices. It seems that using multiple context does not help . I think I have to use a multi-thread lib.
The opencl specification says, under task parallelling mode , user can :
- using vector data types implemented by the device,
- enqueuing multiple tasks, and/or
- enqueing native kernels developed using a programming model orthogonal to OpenCL.
Unfortunately, my devices support neither out_of_order nor native kernel executions.