-
-
Save pawelKondzior/c42d8792bb6ad886d6a8596fe001c8da to your computer and use it in GitHub Desktop.
Revisions
-
pawelKondzior created this gist
Jan 30, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ [Cudafy] public static void thekernel(GThread thread, VectorStruct[] a, VectorStruct[] b, VectorStruct[] c) { int tid = thread.threadIdx.x; if (tid < N) { c[tid].x = a[tid].x + b[tid].x; c[tid].y = a[tid].y + b[tid].y; c[tid].z = a[tid].z + b[tid].z; } }