aboutsummaryrefslogtreecommitdiff
path: root/vendor/exr/benches/profiling.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
committerValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
commita990de90fe41456a23e58bd087d2f107d321f3a1 (patch)
tree15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/exr/benches/profiling.rs
parent3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff)
downloadfparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz
fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip
Deleted vendor folder
Diffstat (limited to 'vendor/exr/benches/profiling.rs')
-rw-r--r--vendor/exr/benches/profiling.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/exr/benches/profiling.rs b/vendor/exr/benches/profiling.rs
deleted file mode 100644
index 1ae8c0d..0000000
--- a/vendor/exr/benches/profiling.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-#[macro_use]
-extern crate bencher;
-
-extern crate exr;
-use exr::prelude::*;
-
-use bencher::Bencher;
-use std::fs;
-use std::io::Cursor;
-use exr::image::pixel_vec::PixelVec;
-
-const PROFILING_REPETITIONS: i32 = 1; // make this 100 for profiling longer periods
-
-/// This is a suuuper long benchmark, to allow you to hook up a profiler while running it
-/// but this means we don't want it in our normal benchmarks
-fn read_single_image_from_buffer_rgba_f32_as_f16(bench: &mut Bencher) {
-
- let mut file = fs::read("tests/images/valid/custom/crowskull/crow_uncompressed.exr").unwrap();
- bencher::black_box(&mut file);
-
- bench.iter(||{
- for _ in 0 .. PROFILING_REPETITIONS {
- let image = exr::prelude::read()
- .no_deep_data().largest_resolution_level()
- .rgba_channels(PixelVec::<(f16,f16,f16,f16)>::constructor, PixelVec::set_pixel)
- .first_valid_layer().all_attributes()
- .non_parallel()
- .from_buffered(Cursor::new(file.as_slice())).unwrap();
-
- bencher::black_box(image);
- }
- })
-}
-
-benchmark_group!(profiling,
- read_single_image_from_buffer_rgba_f32_as_f16
-);
-
-benchmark_main!(profiling); \ No newline at end of file