blob: 6d33be87576c4b357c5da9e42a1e7216d4647e74 [file]
// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
#include <Eigen/SparseQR>
#include "sparse_factorize_benchmark.h"
template <typename Scalar>
using QR = Eigen::SparseQR<Eigen::SparseMatrix<Scalar>, Eigen::NaturalOrdering<int>>;
BENCHMARK_TEMPLATE(sparseFactorizeBenchmark, QR<float>)->ArgsProduct({{128, 512}, {3, 17, 63}});
BENCHMARK_TEMPLATE(sparseFactorizeBenchmark, QR<double>)
->ArgsProduct({{128, 512}, {3, 17, 63}})
->Args({10000, 0})
->Args({40000, 0});
BENCHMARK_TEMPLATE(sparseFactorizeBenchmark, QR<std::complex<double>>)->ArgsProduct({{128, 512}, {3, 17, 63}});
using FileQR = Eigen::SparseQR<Eigen::SparseMatrix<double>, Eigen::COLAMDOrdering<int>>;
BENCHMARK_TEMPLATE(sparseFactorizeFileBenchmark, FileQR, false)->Unit(benchmark::kMillisecond);