Skip to content

Commit 36a694e

Browse files
committed
Convert statically initialize pixelType to dynamically initialize
due to the size of the array is determined at runtime. Otherwise, only be compiled by GCC can't be compiled by icc and clang. Signed-off-by: Liang <xiaoxia.liang@intel.com>
1 parent 7c84683 commit 36a694e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Library/Raisr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,12 +1053,14 @@ RNLERRORTYPE processSegment(VideoDataType *srcY, VideoDataType *final_outY, Blen
10531053
endRow = endRow > (rows - gLoopMargin) ? (rows - gLoopMargin) : endRow;
10541054

10551055
alignas(64) float GTWG[3][16];
1056-
alignas(64) int pixelType[unrollSizePatchBased] = {0};
1056+
alignas(64) int pixelType[unrollSizePatchBased];
10571057
alignas(64) int hashValue[unrollSizePatchBased];
10581058
alignas(64) const float *fbase[unrollSizePatchBased];
10591059
alignas(64) float pixbuf[unrollSizePatchBased][128] __attribute__((aligned(64)));
10601060
int pix;
10611061
int census = 0;
1062+
memset(pixelType, 0, sizeof(int) * unrollSizePatchBased);
1063+
10621064
#ifdef __AVX512FP16__
10631065
alignas(64) _Float16 GTWG_fp16[3][32];
10641066
alignas(64) const _Float16 *fbase_fp16[unrollSizePatchBased];

0 commit comments

Comments
 (0)