cuElim/benchmark/bench_mul8.cu

19 lines
550 B
Plaintext
Raw Normal View History

2024-09-05 23:46:07 +08:00
#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});