1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #include <stdlib.h>
- static void matmul (const float *A, const float *B, float * C,
- unsigned nx, unsigned ny, unsigned nz)
- __attribute__ ((task));
- static void
- matmul (const float *A, const float *B, float * C,
- unsigned nx, unsigned ny, unsigned nz)
- {
-
- }
- #ifdef STARPU_GCC_PLUGIN
- static void matmul_opencl (const float *A, const float *B, float * C,
- unsigned nx, unsigned ny, unsigned nz)
- __attribute__ ((task_implementation ("opencl", matmul)));
- static void
- matmul_opencl (const float *A, const float *B, float * C,
- unsigned nx, unsigned ny, unsigned nz)
- {
-
- }
- #endif
- int
- main (int argc, char *argv[])
- {
-
- #pragma starpu initialize
- float A[123][42][7], B[123][42][7], C[123][42][7];
- #pragma starpu register A
- #pragma starpu register B
- #pragma starpu register C
-
- matmul ((float *) A, (float *) B, (float *) C, 123, 42, 7);
- #pragma starpu wait
- #pragma starpu shutdown
- return EXIT_SUCCESS;
- }
|