Skip to content

Commit 8e923c4

Browse files
committed
Introduce avxEnabled flag in class AvxAccumulation for consistency reasons.
1 parent 21ccc4a commit 8e923c4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

DeepSkyStackerKernel/avx_avg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class AvxAccumulation
4949
CMemoryBitmap& outputBitmap;
5050
const CTaskInfo& taskInfo;
5151
AvxEntropy& avxEntropy;
52+
bool avxEnabled;
5253
public:
5354
AvxAccumulation() = delete;
5455
AvxAccumulation(const DSSRect& resultRect, const CTaskInfo& tInfo, CMemoryBitmap& tempbm, CMemoryBitmap& outbm, AvxEntropy& entroinfo) noexcept;

DeepSkyStackerKernel/avx_avg_1.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ AvxAccumulation::AvxAccumulation(const DSSRect& resultRect, const CTaskInfo& tIn
4444
tempBitmap{ tempbm },
4545
outputBitmap{ outbm },
4646
taskInfo{ tInfo },
47-
avxEntropy{ entroinfo }
47+
avxEntropy{ entroinfo },
48+
avxEnabled{ AvxSimdCheck::checkSimdAvailability() }
4849
{}
4950

5051
int AvxAccumulation::accumulate(const int nrStackedBitmaps)
5152
{
52-
if (!AvxSimdCheck::checkSimdAvailability())
53+
if (!avxEnabled)
5354
return 1;
5455
return avxAccumulate(nrStackedBitmaps);
5556
}

0 commit comments

Comments
 (0)