AnsweredAssumed Answered

Questions about cl::Platform?

Question asked by craft_coder on Mar 11, 2012
Latest reply on Mar 13, 2012 by craft_coder

I'm reading through the C++ header file supplied with the 2011-12-19 release of the AMD APP SDK.

 

I noticed an unimplemented static member function:

 

     const cl::Platform cl::Platform::null()

 

 

It has no docs.  What is that all about?

 

 

Also, I was trying to sort out what this function did:

 

    static cl_int cl::Platform::get(cl::Platform *platform)

 

 

Also no docs.  It appears to assign the pointer with a new Platform that's constructed from the first Platform ID.  I actually thought there was a memory leak, but then I looked up alloca().  I'd have just used a boost::scoped_array<> for that.

 

This appears to do the same thing, though returning the first Platform instead of assigning it through a provided pointer:

 

    static cl::Platform cl::Platform::get (cl_int *errResult=NULL)

 

Does anyone know if these are in the standard?  Is there any other doc describing the C++ interface besides opencl-cplusplus-1.1.pdf on Khronos' site?

Outcomes