WiscSort / wiscSort / RSW / header / parameter.h
parameter.h
Raw
#ifndef PARAMETER_H
#define PARAMETER_H
#include <stdint.h>

#define MEM_SIZE 5237760 // ~20 GB in BLOCK_SIZE
// NOTE: file size must be 214748160 records or multiple.
//#define MEM_SIZE 1048576
//#define BLOCK_SIZE 4096
#define BLOCK_SIZE 4100
#define RECORD_SIZE sizeof(record_t)
//#define KEY_SIZE sizeof(k_t)

#define OUTPUT_BUFFER_SIZE 261888 // 1 GiB in BLOCK_SIZE
#define NUM_PER_BLOCK (BLOCK_SIZE / RECORD_SIZE)
#define NUM_PER_OUT_BLOCK ((OUTPUT_BUFFER_SIZE * BLOCK_SIZE)/RECORD_SIZE)
#define READ_SIZE 1 // in BLOCK_SIZE
#define WRITE_SIZE 1 // in OUTPUT_BUFFER_SIZE
#define TEN_GB_B 10737418240
#endif