f40197561c
Members are constructed in declaration order, not initializer-list order. azint_bins and npixel were computed from the integration reference before that reference member was bound, which is undefined behavior and could leave both with garbage values (propagating to GPU buffer sizes). Reorder declarations so integration is bound first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
786 B
C++
23 lines
786 B
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include "../../common/AzimuthalIntegrationMapping.h"
|
|
#include "../../common/AzimuthalIntegrationProfile.h"
|
|
#include "../image_preprocessing/ImagePreprocessorBuffer.h"
|
|
|
|
class AzIntEngine {
|
|
protected:
|
|
const AzimuthalIntegrationMapping& integration;
|
|
const uint16_t azint_bins;
|
|
const size_t npixel;
|
|
std::vector<float> azint_sum;
|
|
std::vector<float> azint_sum2;
|
|
std::vector<uint32_t> azint_count;
|
|
public:
|
|
AzIntEngine(const AzimuthalIntegrationMapping& integration);
|
|
virtual ~AzIntEngine() = default;
|
|
virtual void Run(const ImagePreprocessorBuffer &image, AzimuthalIntegrationProfile &profile) = 0;
|
|
};
|