diff --git a/examples/viewcopy/viewcopy.cpp b/examples/viewcopy/viewcopy.cpp index cea38a647e..ceb91816bd 100644 --- a/examples/viewcopy/viewcopy.cpp +++ b/examples/viewcopy/viewcopy.cpp @@ -428,23 +428,23 @@ inline constexpr auto is_AoSoA> = true; auto main() -> int try { - const auto numThreads = static_cast(omp_get_max_threads()); - std::cout << "Threads: " << numThreads << "\n"; - const auto dataSize = std::reduce(arrayDims.begin(), arrayDims.end(), std::size_t{1}, std::multiplies{}) * llama::sizeOf; - + const auto numThreads = static_cast(omp_get_max_threads()); + std::cout << "Data size: " << dataSize << "\n"; + std::cout << "Threads: " << numThreads << "\n"; + std::ofstream plotFile{"viewcopy.tsv"}; plotFile.exceptions(std::ios::badbit | std::ios::failbit); plotFile << "\"\"\t\"memcpy\"\t\"memcpy(p)\"\t\"memcpy\\\\\\_avx2\"\t\"memcpy\\\\\\_avx2(p)\"\t\"naive copy\"\t\"naive " "copy(p)\"\t\"std::copy\"\t\"aosoa copy(r)\"\t\"aosoa copy(w)\"\t\"aosoa copy(r,p)\"\t\"aosoa copy(w,p)\"\n"; - std::vector src(dataSize); + std::vector> src(dataSize); auto benchmarkMemcpy = [&](std::string_view name, auto memcpy) { - std::vector dst(dataSize); + std::vector> dst(dataSize); Stopwatch watch; for (auto i = 0; i < REPETITIONS; i++) memcpy(dst.data(), src.data(), dataSize);