Context Properties doubt

Discussion created by ankurdh on Jan 8, 2010
Latest reply on Jan 14, 2010 by ankurdh

Consider the following code:

using namespace cl;

int main(){

vector<Platform> platforms;

cl_int err = Platform::get(&platforms);

vector<Platform>::iterator itr = platforms.begin();

cl_context_properties cps = {






* rest of the code. . 



Now, what i want to know is, int the line


what do the last pair of paranthesis do?

i tried (cl_context_properties)(*itr). It didn't work. 

*itr a Platform type object rite? So, does that last pair of parenthesis mean that we are calling the default constructor of that Platform object?

if yes, why should we do that? We need a variable of type 

cl_platform_id rite?

Thats what the manual says!