summaryrefslogtreecommitdiff
path: root/csrc/common.h
diff options
context:
space:
mode:
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