Skip to content

Instantly share code, notes, and snippets.

@pawelKondzior
Created January 30, 2017 22:46
Show Gist options
  • Select an option

  • Save pawelKondzior/c42d8792bb6ad886d6a8596fe001c8da to your computer and use it in GitHub Desktop.

Select an option

Save pawelKondzior/c42d8792bb6ad886d6a8596fe001c8da to your computer and use it in GitHub Desktop.
[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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment