Lines Matching defs:benchFn
12 /* benchfn :
63 BMK_benchFn_t benchFn; /* the function to benchmark, over the set of blocks */
64 void* benchPayload; /* pass custom parameters to benchFn :
65 * (*benchFn)(srcBuffers[i], srcSizes[i], dstBuffers[i], dstCapacities[i], benchPayload) */
68 BMK_errorFn_t errorFn; /* errorFn will check each return value of benchFn over each block, to determine if it failed or not.
70 * errorFn must return 0 when benchFn was successful, and >= 1 if it detects an error.
73 size_t blockCount; /* number of blocks to operate benchFn on.
76 const void *const * srcBuffers; /* read-only array of buffers to be operated on by benchFn */
78 void *const * dstBuffers; /* array of buffers to be written into by benchFn. This array is not optional, it must be provided even if unused by benchfn. */
80 size_t* blockResults; /* Optional: store the return value of benchFn for each block. Use NULL if this result is not requested. */
85 * This function benchmarks benchFn and initFn, providing a result.
88 * nbLoops: defines number of times benchFn is run over the full set of blocks.
95 * .sumOfReturn : the sum of all return values of benchFn through all of blocks
96 * .nanoSecPerRun : time per run of benchFn + (time for initFn / nbLoops)
101 * params.blockResults contains all return values of `benchFn` over all blocks.
103 * params.blockResults contains return values of `benchFn` over all blocks preceding and including the failed block.
118 /* when benchmark failed, it means one invocation of `benchFn` failed.
119 * The failure was detected by `errorFn`, operating on return values of `benchFn`.