Skip to content

Commit

Permalink
replace math.h with cmath
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Sep 12, 2024
1 parent 5559611 commit 25babf0
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion RandBLAS/dense_skops.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <string>
#include <tuple>

#include <math.h>
#include <cmath>
#include <typeinfo>


Expand Down
10 changes: 5 additions & 5 deletions RandBLAS/random_gen.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#include <math.h>
#include <cmath>

#if !defined(R123_NO_SINCOS) && defined(__APPLE__)
/* MacOS X 10.10.5 (2015) doesn't have sincosf */
Expand All @@ -47,13 +47,13 @@

#if R123_NO_SINCOS /* enable this if sincos and sincosf are not in the math library */
R123_CUDA_DEVICE R123_STATIC_INLINE void sincosf(float x, float *s, float *c) {
*s = sinf(x);
*c = cosf(x);
*s = std::sinf(x);
*c = std::cosf(x);
}

R123_CUDA_DEVICE R123_STATIC_INLINE void sincos(double x, double *s, double *c) {
*s = sin(x);
*c = cos(x);
*s = std::sin(x);
*c = std::cos(x);
}
#endif /* sincos is not in the math library */

Expand Down
2 changes: 1 addition & 1 deletion RandBLAS/skge.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <stdexcept>
#include <string>

#include <math.h>
#include <cmath>
#include <typeinfo>


Expand Down
2 changes: 1 addition & 1 deletion RandBLAS/skve.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <stdexcept>
#include <string>

#include <math.h>
#include <cmath>
#include <typeinfo>


Expand Down
2 changes: 1 addition & 1 deletion examples/sparse-low-rank-approx/qrcp_matrixmarket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <time.h>
#include <stdlib.h>
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion examples/sparse-low-rank-approx/svd_matrixmarket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <time.h>
#include <stdlib.h>
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion examples/sparse-low-rank-approx/svd_rank1_plus_noise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <time.h>
#include <stdlib.h>
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion examples/total-least-squares/tls_dense_skop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <time.h>
#include <stdlib.h>
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion examples/total-least-squares/tls_sparse_skop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <time.h>
#include <stdlib.h>
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion test/comparison.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "RandBLAS.hh"
#include <gtest/gtest.h>
#include <math.h>
#include <cmath>
#include <cmath>
#include <numeric>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion test/test_basic_rng/test_r123.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <math.h>
#include <cmath>

#include <sstream>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion test/test_datastructures/test_sparseskop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <RandBLAS/util.hh>
#include "test/comparison.hh"
#include <gtest/gtest.h>
#include <math.h>
#include <cmath>

using RandBLAS::RNGState;
using RandBLAS::SignedInteger;
Expand Down

0 comments on commit 25babf0

Please sign in to comment.