cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

MatAle
Journeyman III

How to create my own function?

Hello. I was wondering whether it is possible to create multiple functions. For example function for creating context, command_queue, building kernel....?

I'm a bit confused because I do not know what the specific function returns. For example function for creating context would return context.

To illustrate what I mean:

create_context() {

create context.....;

        return context;

}

.

.

.

Is it possible to create functions like this in my main program?

 

0 Likes
1 Reply
himanshu_gautam
Grandmaster

ofccourse it is possible. Just refer to the opencl spec to figure out what function returns what and you can do it.

0 Likes