Hi,

I would like to check if a given comand queue is valid. (I have a lot of host code, some functions taking a command queue as a parameter, and I had a bug where I gave an unitialised command queue, so I would like to avoid such a bug in the future).
Anyway, I have tried a simple:

Code :
bool queueValid(const cl_command_queue& queue)
{
    size_t size;
    cl_int err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, 0, NULL, &size);
    return (err == CL_SUCCESS);
}

But it turns out that calling clGetCommandQueueInfo on an unitialised queue segfault. (AMD APP SDK 2.7)

I have seen a previous post about "Check whether cl_mem object is valid":http://www.khronos.org/message_board...hp?f=28&t=4995
but it does not seem to apply to queues.

Any pointer ? (no pun intended!)
Thanks a lot in advance.

Seb