| 41 | } |
| 42 | |
| 43 | static void OBL_parse_init_params(const char *cache_specific_params, OBL_init_params_t *init_params) { |
| 44 | char *params_str = strdup(cache_specific_params); |
| 45 | |
| 46 | while (params_str != NULL && params_str[0] != '\0') { |
| 47 | char *key = strsep((char **)¶ms_str, "="); |
| 48 | char *value = strsep((char **)¶ms_str, ","); |
| 49 | while (params_str != NULL && *params_str == ' ') { |
| 50 | params_str++; |
| 51 | } |
| 52 | if (strcasecmp(key, "block-size") == 0) { |
| 53 | init_params->block_size = atoi(value); |
| 54 | } else if (strcasecmp(key, "sequential-confidence-k") == 0) { |
| 55 | init_params->sequential_confidence_k = atoi(value); |
| 56 | } else { |
| 57 | ERROR("OBL does not have parameter %s\n", key); |
| 58 | printf("default params: %s\n", OBL_default_params()); |
| 59 | exit(1); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | static void set_OBL_params(OBL_params_t *OBL_params, OBL_init_params_t *init_params, uint64_t cache_size) { |
| 65 | OBL_params->block_size = init_params->block_size; |
no test coverage detected