OpenCL creates new threads upon first function call, why? -


when call opencl function wouldn't imagine create new threads, in case platform ids, program creates 8 new threads.

    cl_platform_id platforms[10] = {0};     cl_uint numberofplatforms = 0;     clgetplatformids(10, platforms, &numberofplatforms);//this creates 8 threads 

due me not creating context, asking platform ids see available, why function create these threads? i'm using windows 7 64 bit, i7 920 ht (i suspicious creating 8 threads because have 8 cores), both intel , nvidia sdk( have gts 250 , gtx 560), while i'm linking nvidia opencl libraries , using headers.

this isn't big concern, if decide not use opencl after analyzing devices, have 8 useless threads "lying around". know why happens?

a lot of opencl functions non-blocking, meaning issue commands device in form of queue , i'm pretty sure threads used control device while host program continues run rest of code.

to illustrate: when call clenqueuendrangekernel, kernel not run @ once, program continues run code after clenqueuendrangekernel call. guess functions passes information separate threads controls compute device , makes sure kernel run eventually.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

delphi - How to convert bitmaps to video? -