19 lines
550 B
Plaintext
19 lines
550 B
Plaintext
|
#include <benchmark/benchmark.h>
|
||
|
#include "cuelim.cuh"
|
||
|
|
||
|
template <GF28Matrix (*GpuFunc)(const GF28Matrix &, const GF28Matrix &, const GF28 &)>
|
||
|
void bench_mul8(benchmark::State &state)
|
||
|
{
|
||
|
GF28 ff(0b100011101);
|
||
|
uint_fast32_t seed = 41921095;
|
||
|
size_t x = state.range(0), y = state.range(1), z = state.range(2);
|
||
|
GF28Matrix A(x, y), B(y, z);
|
||
|
A.randomize(seed);
|
||
|
B.randomize(seed);
|
||
|
for (auto _ : state)
|
||
|
{
|
||
|
GF28Matrix C(GpuFunc(A, B, ff));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
BENCHMARK_TEMPLATE(bench_mul8, gpu_mul)->Args({100000, 100000, 100000});
|