summaryrefslogtreecommitdiff
path: root/examples/cuda-chill/mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cuda-chill/mm.c')
-rw-r--r--examples/cuda-chill/mm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/cuda-chill/mm.c b/examples/cuda-chill/mm.c
new file mode 100644
index 0000000..0efbeeb
--- /dev/null
+++ b/examples/cuda-chill/mm.c
@@ -0,0 +1,10 @@
+#define N 1024
+
+void normalMM(float c[N][N], float a[N][N], float b[N][N]) {
+ int i, j, k;
+
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ for (k = 0; k < N; k++)
+ c[j][i] = c[j][i] + a[k][i] * b[j][k];
+}