Skip to content

Instantly share code, notes, and snippets.

@kika123
Created March 7, 2015 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kika123/f184053bd9838630fa8b to your computer and use it in GitHub Desktop.
Save kika123/f184053bd9838630fa8b to your computer and use it in GitHub Desktop.
vc4 simple kernel
#include <pi.h>
#include <stdio.h>
int main(void) { /* no args passed */
int x = pi_kernel_parameters->r3; /*task number*/
pi_kernel_parameters->r0[x]= pi_kernel_parameters->r1[x]+pi_kernel_parameters->r2[x]; /* compute */
exit(EXIT_SUCCESS); /*exiting */
return 0; /* exit() does nothing with an old buggy version, attempt to fix it */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment