Home | History | Annotate | Download | only in unittest

Lines Matching refs:params

178       Vector params = EstimateParameters(*cost_m, *stats, 0.0005, &iterations);
179 CHECK(params.GetSize() == parameters.size());
180 /*params[0] = 1000;
181 params[1] = 3600;
182 params[2] = 80;
183 params[3] = 0;
184 params[4] = 19530;
185 params[5] = 1720;*/
188 printf("param[%i] = %lf\n", i, params[i]);
189 *(parameters[i]) = params[i];
191 printf("Est. stats: %s\n", cost_m->MultiplyRight(params).ToString().c_str());
230 struct Params {
240 } params;
246 data = new int[params.DATA_SIZE];
252 int id = rand() % params.NUM_CONTEXTS;
254 for (int i = 0; i < params.NUM_ITERATIONS; i++) {
256 for (int j = 0; j < params.DATA_SIZE; j++) {
257 for (int k = 0; k < params.REDO_CNT; k++)
267 goals.RegisterParameter(&params.num_iterations_times_runcount);
268 goals.SetParameterStat(N_MUTEX_LOCK_UNLOCK, &params.num_iterations_times_runcount, 3 /*don't ask why*/);
269 goals.SetParameterStat(N_MEM_ACCESSES_K, &params.num_iterations_times_runcount,
270 params.DATA_SIZE * params.REDO_CNT * 2.0 / 1000.0);
272 goals.RegisterParameter(&params.num_contexts);
273 goals.SetParameterStat(N_MUTEXES, &params.num_contexts, 1);
278 params.NUM_CONTEXTS = round(params.num_contexts);
279 if (params.NUM_CONTEXTS <= 0)
280 params.NUM_CONTEXTS = 1;
281 params.NUM_ITERATIONS = round(params.num_iterations_times_runcount / map_of_counts[101]);
283 contexts = new TestContext[params.NUM_CONTEXTS];
397 struct Params {
403 } params;
420 TestContext * context = &contexts[rand() % params.NUM_CONTEXTS];
422 int str_len = 1 + (rand() % params.DATA_SIZE);
446 struct Params {
452 Params() {
463 } params;
479 int id = rand() % params.NUM_CONTEXTS;
485 int LEN = params.DATA_SIZE;
487 for (int i = 0; i < params.REDO; i++)
492 context->CV_Signalled = params.NUM_CONTEXTS;
501 goals.RegisterParameter(&params.num_contexts);
502 goals.SetParameterStat(N_CV, &params.num_contexts, 1);
503 goals.SetParameterStat(N_MUTEXES, &params.num_contexts, 1);
505 goals.RegisterParameter(&params.data_size_times_runcount);
506 goals.SetParameterStat(N_MEM_ACCESSES_K, &params.data_size_times_runcount,
507 (2*params.REDO) * (1.0 + params.HIT_PROBABILITY) / 1000.0);
513 params.DATA_SIZE = 1 + round(params.data_size_times_runcount / params.EstimateRuncount());
514 /*if (params.DATA_SIZE < 1)
515 params.DATA_SIZE = 1;*/
517 params.NUM_CONTEXTS = round(params.num_contexts);
518 if (params.NUM_CONTEXTS < 1)
519 params.NUM_CONTEXTS = 1;
520 contexts = new TestContext[params.NUM_CONTEXTS];
524 params.NUM_CONTEXTS = 100;
525 params.DATA_SIZE = 10000;
526 contexts = new TestContext[params.NUM_CONTEXTS];
533 params.NUM_CONTEXTS;
537 if (nAttempts++ > params.NUM_CONTEXTS)
540 id = (id + 1) % params.NUM_CONTEXTS;
557 goals.SetParameterStat(N_CV_WAITS, num_CV_Waits, params.HIT_PROBABILITY);
722 printf("Usage: bigtest [PARAM=VALUE] ...\n Available params: ");