Example #1
0
 private static void AHybridMethod(Cudafy.GThread thread, int[] data, int[] results)
 {
     GThread.InsertCode("#pragma unroll 5");
     for (int h = 0; h < data.Length; h++)
     {
         GThread.InsertCode("{0}[{2}] = {1}[{2}];", results, data, h);
     }
 }
 public static void kernelTest(GThread thread, TestStruct[] structure, int[] intArray)
 {
     // Do something
     GThread.InsertCode("int* pointer = (int*)structure[0].dataPointer;");
     GThread.InsertCode("structure[0].value = pointer[1];");                 // Here you can acces your data using pointer pointer[0], pointer[1] and so on
 }
Example #3
0
 public static void kernelTest(GThread thread, TestStruct[] structure, int[] intArray)
 {
     // Do something
     GThread.InsertCode("int* pointer = (int*)structure[0].dataPointer;");
     GThread.InsertCode("structure[0].value = pointer[1];");
 }