OpenCL Object Queries and speed

This is probably a simple question, but I’m not finding any info since this is likely an implementation issue as opposed to a spec issue.

How fast are queries like clGetMemObjectInfo? Are they simply lookups in the opaque cl_mem struct or are they more involved? I’m asking because I’m trying to decide how much information to keep track of myself v. how much to simple query through OpenCL calls, particularly for objects like cl_mem that might be used frequently.

As you say, that’s going to be implementation-dependent. However, I would expect clGetMemObjectInfo() on any implementation to basically translate to a struct field lookup. The same should hold true for most if not all the other clGetXXXInfo() calls.

If I were you I would just use the CL calls indiscriminately.