99 using namespace impala;
116 for (
int i = 0; i < batch_size; ++i) {
119 for (
int j = 0; j < data->
num_values; j += 8) {
136 for (
int i = 0; i < batch_size; ++i) {
139 for (
int j = 0; j < data->
num_values; j += 8) {
155 for (
int i = 0; i < batch_size; ++i) {
158 for (
int j = 0; j < data->
num_values; j += 8) {
175 for (
int i = 0; i < batch_size; ++i) {
178 for (
int j = 0; j < data->
num_values; j += 8) {
192 int main(
int argc,
char** argv) {
198 int num_values = 4096;
203 for (
int i = 0; i < max_bits; ++i) {
211 suffix <<
" " << (i+1) <<
"-Bit";
214 name <<
"\"BitWriter (8 byte)" << suffix.str() <<
"\"";
219 name <<
"\"BitWriter" << suffix.str() <<
"\"";
222 cout << encode_suite.
Measure() << endl;
225 for (
int i = 0; i < max_bits; ++i) {
227 suffix <<
" " << (i+1) <<
"-Bit";
230 name <<
"\"BitWriter (8 byte)" << suffix.str() <<
"\"";
235 name <<
"\"BitWriter" << suffix.str() <<
"\"";
238 cout << decode_suite.
Measure() << endl;
bool PutValue(uint64_t v, int num_bits)
int AddBenchmark(const std::string &name, BenchmarkFunction fn, void *args, int baseline_idx=0)
int main(int argc, char **argv)
void TestBitWriterDecode(int batch_size, void *d)
std::string Measure()
Runs all the benchmarks and returns the result in a formatted string.
void TestBitWriter8ByteDecode(int batch_size, void *d)
void TestBitWriterEncode(int batch_size, void *d)
bool GetValue(int num_bits, T *v)
void Flush(bool align=false)
static int Ceil(int value, int divisor)
Returns the ceil of value/divisor.
This class is thread-safe.
void TestBitWriter8ByteEncode(int batch_size, void *d)
static void Init()
Initialize CpuInfo.
bool PutValue(uint64_t v, int num_bits)
bool GetValue(int num_bits, T *v)