]> git.kaiwu.me - klib.git/commitdiff
parallelize simple "for" loops
authorHeng Li <lh3@me.com>
Tue, 8 Oct 2013 20:50:21 +0000 (16:50 -0400)
committerHeng Li <lh3@me.com>
Tue, 8 Oct 2013 20:50:21 +0000 (16:50 -0400)
kthread.h [new file with mode: 0644]

diff --git a/kthread.h b/kthread.h
new file mode 100644 (file)
index 0000000..735137f
--- /dev/null
+++ b/kthread.h
@@ -0,0 +1,12 @@
+#ifndef KTHREAD_H
+#define KTHREAD_H
+
+#include <stdlib.h>
+
+#define KTF_DEF_DQBITS 10
+
+typedef int (*kt_for_f)(void *global, void *local);
+
+void kt_for(int n, kt_for_f func, void *global, int m, int size, void *local, int dq_bits);
+
+#endif