CompressionBenchmark: Fix minor issue in assigning images for analysis
This commit is contained in:
@@ -12,13 +12,15 @@
|
||||
#include "JFJochDecompress.h"
|
||||
|
||||
double CheckCompressionThread(const DiffractionExperiment &x,
|
||||
int32_t nimages, int32_t stride,
|
||||
int32_t nimages,
|
||||
int32_t image0,
|
||||
int32_t stride,
|
||||
const std::vector<int16_t> &image,
|
||||
std::vector<uint16_t> &output) {
|
||||
double ret = 0;
|
||||
|
||||
FrameTransformation transformation(x);
|
||||
for (int i = 0; i < nimages; i += stride) {
|
||||
for (int32_t i = image0; i < nimages; i += stride) {
|
||||
for (int j = 0; j < x.GetModulesNum(); j++ ) {
|
||||
transformation.ProcessModule(image.data() + (j + i * x.GetModulesNum()) * RAW_MODULE_SIZE, j, 0);
|
||||
}
|
||||
@@ -40,7 +42,8 @@ std::string CheckCompression(const DiffractionExperiment &x, int32_t nimages, co
|
||||
std::vector<std::future<double>> futures;
|
||||
|
||||
for (int i = 0; i < nthreads; i++)
|
||||
futures.emplace_back(std::async(std::launch::async, &CheckCompressionThread, std::ref(x), nimages, nthreads,
|
||||
futures.emplace_back(std::async(std::launch::async, &CheckCompressionThread, std::ref(x),
|
||||
nimages, i, nthreads,
|
||||
std::ref(image), std::ref(output)));
|
||||
|
||||
for (int i = 0; i < nthreads; i++)
|
||||
|
||||
Reference in New Issue
Block a user