summaryrefslogtreecommitdiff
path: root/csrc/common.h
diff options
context:
space:
mode:
authorTim Dettmers <TimDettmers@users.noreply.github.com>2022-07-18 09:51:37 -0700
committerGitHub <noreply@github.com>2022-07-18 09:51:37 -0700
commit4cd7ea62b2f51c68aacde2f62e7141765e476111 (patch)
tree548b2e77c62acd152330e898a6e17ea949a156d1 /csrc/common.h
parent3418cd390e952a7752fb6b2544c25e25af7c0371 (diff)
parentfd750cd2370b3b12e216a9148b23aaae63a80989 (diff)
Merge pull request #3 from TimDettmers/cpuonly
Add a CPU-only build option
Diffstat (limited to 'csrc/common.h')
-rw-r--r--csrc/common.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/csrc/common.h b/csrc/common.h
new file mode 100644
index 0000000..2f25a58
--- /dev/null
+++ b/csrc/common.h
@@ -0,0 +1,23 @@
+#include <BinSearch.h>
+
+#ifndef common
+#define common
+
+using namespace BinSearch;
+
+struct quantize_block_args {
+ BinAlgo<Scalar, float, Direct2> *bin_searcher;
+ float *code;
+ float *A;
+ float *absmax;
+ unsigned char *out;
+ int block_end;
+ int block_idx;
+ int threadidx;
+};
+
+#define BLOCK_SIZE 4096
+
+void *quantize_block(void *arguments);
+
+#endif