Skip to content

Error Handling

Hüseyin Tuğrul BÜYÜKIŞIK edited this page Mar 31, 2017 · 4 revisions

There is only one error handling in Cekirdekler API. That is the kernel compiling part. Opencl kernel compiling takes place in initialization part of ClNumberCruncher and if compiler returns any error then it writes error message to console before disposing resources:

     ClNumberCruncher cr = new ClNumberCruncher(AcceleratorType.GPU|AcceleratorType.CPU, kernelString);

even then, it can explicitly be checked for kernel compile errors as

     if(cr.errorCode()!=0)
     { Console.WriteLine(cr.errorMessage());}