How to create my own function?

Discussion created by MatAle on Sep 6, 2011
Latest reply on Sep 8, 2011 by himanshu.gautam

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?