[PATCH] D53523: Add benchmark for std::set.
Denis Yaroshevskiy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 27 08:47:20 PDT 2018
dyaroshev added a comment.
Hi!
FYI, this patch fails to compile on my machine:
Required change:
void run(benchmark::State& State) const {
std::vector<size_t> Keys(TableSize);
void run(benchmark::State& State) const {
std::vector<uint64_t> Keys(TableSize);
I'll add to the pr I'm working on now.
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:46:69: note: in instantiation of member function '(anonymous
namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern, (anonymous namespace)::AccessPattern, 1> >::run' requested
here
[=](benchmark::State& S) { Bench.run(S); });
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:53:3: note: in instantiation of function template specialization
'internal::makeBenchmarkFromValuesImpl<(anonymous namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 1> >, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, 0, 1>' requested here
makeBenchmarkFromValuesImpl<B>(A, std::index_sequence_for<Args...>());
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:58:3: note: in instantiation of function template specialization
'internal::makeBenchmarkFromValues<(anonymous namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 1> >, unsigned long, unsigned long>' requested here
makeBenchmarkFromValues<B<U...> >(A);
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:65:14: note: in instantiation of function template specialization
'internal::makeBenchmarkImpl<Create, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 1> >' requested here
(internal::makeBenchmarkImpl<B>(A, std::tuple<U..., T>(), rest...), ...);
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:115:13: note: in instantiation of function template specialization
'internal::makeBenchmarkImpl<Create, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 0>, internal::EnumValue<(anonymous namespace)::AllAccessPattern, (anonymous namespace)::AccessPattern,
1> >' requested here
internal::makeBenchmarkImpl<B>(V, std::tuple<>(), Tuples()...);
^
/space/llvm/llvm/projects/libcxx/benchmarks/ordered_set.bench.cpp:237:3: note: in instantiation of function template specialization
'makeCartesianProductBenchmark<Create, (anonymous namespace)::AllAccessPattern, std::__1::vector<unsigned long, std::__1::allocator<unsigned
long> >, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > >' requested here
makeCartesianProductBenchmark<Create, AllAccessPattern>(TableSize, NumTables);
^
/space/llvm/llvm/projects/libcxx/benchmarks/ordered_set.bench.cpp:37:6: note: candidate function not viable: no known conversion from
'std::vector<size_t>' (aka 'vector<unsigned long>') to 'std::vector<uint64_t> &' (aka 'vector<unsigned long long> &') for 1st argument
void sortKeysBy(std::vector<uint64_t>& Keys, AccessPattern AP) {
^
/space/llvm/llvm/projects/libcxx/benchmarks/ordered_set.bench.cpp:88:5: error: no matching function for call to 'sortKeysBy'
sortKeysBy(Keys, Access());
^~~~~~~~~~
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:46:69: note: in instantiation of member function '(anonymous
namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern, (anonymous namespace)::AccessPattern, 0> >::run' requested
here
[=](benchmark::State& S) { Bench.run(S); });
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:53:3: note: in instantiation of function template specialization
'internal::makeBenchmarkFromValuesImpl<(anonymous namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 0> >, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, 0, 1>' requested here
makeBenchmarkFromValuesImpl<B>(A, std::index_sequence_for<Args...>());
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:58:3: note: in instantiation of function template specialization
'internal::makeBenchmarkFromValues<(anonymous namespace)::Create<internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 0> >, unsigned long, unsigned long>' requested here
makeBenchmarkFromValues<B<U...> >(A);
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:65:14: note: in instantiation of function template specialization
'internal::makeBenchmarkImpl<Create, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 0> >' requested here
(internal::makeBenchmarkImpl<B>(A, std::tuple<U..., T>(), rest...), ...);
^
/space/llvm/llvm/projects/libcxx/benchmarks/CartesianBenchmarks.hpp:115:13: note: in instantiation of function template specialization
'internal::makeBenchmarkImpl<Create, std::__1::vector<std::__1::tuple<unsigned long, unsigned long>,
std::__1::allocator<std::__1::tuple<unsigned long, unsigned long> > >, internal::EnumValue<(anonymous namespace)::AllAccessPattern,
(anonymous namespace)::AccessPattern, 0>, internal::EnumValue<(anonymous namespace)::AllAccessPattern, (anonymous namespace)::AccessPattern,
1> >' requested here
internal::makeBenchmarkImpl<B>(V, std::tuple<>(), Tuples()...);
^
/space/llvm/llvm/projects/libcxx/benchmarks/ordered_set.bench.cpp:237:3: note: in instantiation of function template specialization
'makeCartesianProductBenchmark<Create, (anonymous namespace)::AllAccessPattern, std::__1::vector<unsigned long, std::__1::allocator<unsigned
long> >, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > >' requested here
makeCartesianProductBenchmark<Create, AllAccessPattern>(TableSize, NumTables);
^
/space/llvm/llvm/projects/libcxx/benchmarks/ordered_set.bench.cpp:37:6: note: candidate function not viable: no known conversion from
'std::vector<size_t>' (aka 'vector<unsigned long>') to 'std::vector<uint64_t> &' (aka 'vector<unsigned long long> &') for 1st argument
void sortKeysBy(std::vector<uint64_t>& Keys, AccessPattern AP) {
^
2 warnings and 2 errors generated.
make[3]: *** [projects/libcxx/benchmarks/CMakeFiles/ordered_set_libcxx.dir/ordered_set.bench.cpp.o] Error 1
make[2]: *** [projects/libcxx/benchmarks/CMakeFiles/ordered_set_libcxx.dir/all] Error 2
make[1]: *** [projects/libcxx/benchmarks/CMakeFiles/cxx-benchmarks.dir/rule] Error 2
make: *** [cxx-benchmarks] Error 2
Repository:
rL LLVM
https://reviews.llvm.org/D53523
More information about the llvm-commits
mailing list