Skip to content

Commit 64af706

Browse files
stweilzdenop
authored andcommitted
arch: Fix some compiler warnings (-Wignored-qualifiers) (#1400)
Fix these gcc warnings: arch/dotproductavx.cpp:53:45: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] arch/dotproductavx.cpp:54:45: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] arch/dotproductsse.cpp:59:45: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] arch/dotproductsse.cpp:60:45: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] Signed-off-by: Stefan Weil <[email protected]>
1 parent 6b2a090 commit 64af706

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/dotproductavx.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ double DotProductAVX(const double* u, const double* v, int n) {
5050
if (offset <= max_offset) {
5151
offset = 4;
5252
// Aligned load is reputedly faster but requires 32 byte aligned input.
53-
if ((reinterpret_cast<const uintptr_t>(u) & 31) == 0 &&
54-
(reinterpret_cast<const uintptr_t>(v) & 31) == 0) {
53+
if ((reinterpret_cast<uintptr_t>(u) & 31) == 0 &&
54+
(reinterpret_cast<uintptr_t>(v) & 31) == 0) {
5555
// Use aligned load.
5656
__m256d floats1 = _mm256_load_pd(u);
5757
__m256d floats2 = _mm256_load_pd(v);

arch/dotproductsse.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ double DotProductSSE(const double* u, const double* v, int n) {
5656
if (offset <= max_offset) {
5757
offset = 2;
5858
// Aligned load is reputedly faster but requires 16 byte aligned input.
59-
if ((reinterpret_cast<const uintptr_t>(u) & 15) == 0 &&
60-
(reinterpret_cast<const uintptr_t>(v) & 15) == 0) {
59+
if ((reinterpret_cast<uintptr_t>(u) & 15) == 0 &&
60+
(reinterpret_cast<uintptr_t>(v) & 15) == 0) {
6161
// Use aligned load.
6262
sum = _mm_load_pd(u);
6363
__m128d floats2 = _mm_load_pd(v);

0 commit comments

Comments
 (0)