Skip to content

Commit

Permalink
Fix MSVC small_blas_test failures
Browse files Browse the repository at this point in the history
The tests fail only in C++17 mode (and above) with optimizations enabled.

Fixes #782

Change-Id: Ia3b7221efdd9091d252a7323613b7e54794470ee
  • Loading branch information
sergiud authored and sandwichmaker committed Mar 27, 2022
1 parent b246991 commit b342802
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions internal/ceres/small_blas_generic.h
@@ -1,5 +1,5 @@
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2018 Google Inc. All rights reserved.
// Copyright 2022 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -100,10 +100,11 @@ static inline void MMM_mat1x4(const int col_a,
#define CERES_GEMM_OPT_MMM_MAT1X4_MUL \
av = pa[k]; \
pb = b + bi; \
c0 += av * *pb++; \
c1 += av * *pb++; \
c2 += av * *pb++; \
c3 += av * *pb++; \
c0 += av * pb[0]; \
c1 += av * pb[1]; \
c2 += av * pb[2]; \
c3 += av * pb[3]; \
pb += 4; \
bi += col_stride_b; \
k++;

Expand Down Expand Up @@ -167,10 +168,11 @@ static inline void MTM_mat1x4(const int col_a,
#define CERES_GEMM_OPT_MTM_MAT1X4_MUL \
av = pa[ai]; \
pb = b + bi; \
c0 += av * *pb++; \
c1 += av * *pb++; \
c2 += av * *pb++; \
c3 += av * *pb++; \
c0 += av * pb[0]; \
c1 += av * pb[1]; \
c2 += av * pb[2]; \
c3 += av * pb[3]; \
pb += 4; \
ai += col_stride_a; \
bi += col_stride_b;

Expand Down

0 comments on commit b342802

Please sign in to comment.