Skip to content

Commit 8785821

Browse files
cabirdmexiaoxial
authored andcommitted
report error and exit if loopitr is a value thats not supported
1 parent c8de4fb commit 8785821

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Library/Raisr.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,13 +1127,17 @@ RNLERRORTYPE processSegment(VideoDataType *srcY, VideoDataType *final_outY, Blen
11271127
return RNLErrorBadParameter;
11281128
}
11291129
}
1130+
11301131
#ifdef __AVX512FP16__
11311132
if (gAsmType == AVX512_FP16) {
11321133
if (loopItr == 8) {
11331134
GetHashValue_AVX512FP16_16h_8Elements(GTWG_fp16, passIdx, hashValue);
11341135
}
11351136
else if (loopItr == 32) {
11361137
GetHashValue_AVX512FP16_16h_32Elements(GTWG_fp16, passIdx, hashValue);
1138+
} else {
1139+
std::cout << "unsupported loopItr value: " << loopItr << std::endl;
1140+
return RNLErrorBadParameter;
11371141
}
11381142
} else
11391143
#endif
@@ -1143,6 +1147,9 @@ RNLERRORTYPE processSegment(VideoDataType *srcY, VideoDataType *final_outY, Blen
11431147
}
11441148
else if (loopItr == 16) {
11451149
GetHashValue_AVX512_32f_16Elements(GTWG, passIdx, hashValue); // 16 elements
1150+
} else {
1151+
std::cout << "unsupported loopItr value: " << loopItr << std::endl;
1152+
return RNLErrorBadParameter;
11461153
}
11471154
}
11481155

0 commit comments

Comments
 (0)