2022-07-01 14:16:10 +00:00
|
|
|
#include <BinSearch.h>
|
|
|
|
|
|
|
|
#ifndef common
|
|
|
|
#define common
|
|
|
|
|
|
|
|
using namespace BinSearch;
|
|
|
|
|
2022-09-11 18:55:09 +00:00
|
|
|
#define BLOCK_SIZE 16384
|
|
|
|
|
2022-07-01 14:16:10 +00:00
|
|
|
struct quantize_block_args {
|
|
|
|
BinAlgo<Scalar, float, Direct2> *bin_searcher;
|
|
|
|
float *code;
|
|
|
|
float *A;
|
|
|
|
float *absmax;
|
|
|
|
unsigned char *out;
|
2022-09-11 18:55:09 +00:00
|
|
|
long long block_end;
|
|
|
|
long long block_idx;
|
|
|
|
long long threadidx;
|
|
|
|
long long blocksize;
|
2022-07-01 14:16:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void *quantize_block(void *arguments);
|
|
|
|
|
2022-07-01 14:36:30 +00:00
|
|
|
#endif
|