diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index bbe38839a..80d32f26d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: # TODO: add windows builder - os: [ubuntu-20.04, macos-11] + os: [ubuntu-20.04, macos-11, windows-2019] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c5ce56a4d..90c7a9bee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ jobs: include: - os: ubuntu-20.04 - os: macos-11 + - os: windows-2019 steps: - uses: actions/checkout@v3 diff --git a/sphericart/include/templates.hpp b/sphericart/include/templates.hpp index f620b69ae..18a3f4b0b 100644 --- a/sphericart/include/templates.hpp +++ b/sphericart/include/templates.hpp @@ -15,7 +15,14 @@ */ #include -#include + +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327950288 +#endif + +#ifndef M_SQRT1_2 +#define M_SQRT1_2 0.707106781186547524400844362104849039 +#endif #ifdef _OPENMP @@ -303,7 +310,8 @@ void hardcoded_sph( T *ddsph_i = nullptr; #pragma omp for - for (size_t i_sample = 0; i_sample < n_samples; i_sample++) { + for (int64_t i_sample = 0; i_sample < static_cast(n_samples); + i_sample++) { // gets pointers to the current sample input and output arrays xyz_i = xyz + i_sample * 3; sph_i = sph + i_sample * size_y; @@ -1058,7 +1066,8 @@ void generic_sph(const T *xyz, T *sph, [[maybe_unused]] T *dsph, T *ddsph_i = nullptr; #pragma omp for - for (size_t i_sample = 0; i_sample < n_samples; i_sample++) { + for (int64_t i_sample = 0; i_sample < static_cast(n_samples); + i_sample++) { auto xyz_i = xyz + i_sample * 3; // pointer to the segment that should store the i_sample sph sph_i = sph + i_sample * size_y; diff --git a/sphericart/src/sphericart_cuda_stub.cpp b/sphericart/src/sphericart_cuda_stub.cpp index 2f1090de1..8cf213c62 100644 --- a/sphericart/src/sphericart_cuda_stub.cpp +++ b/sphericart/src/sphericart_cuda_stub.cpp @@ -10,10 +10,11 @@ SphericalHarmonics::SphericalHarmonics(size_t l_max, bool normalized) {} template SphericalHarmonics::~SphericalHarmonics() {} template -void SphericalHarmonics::compute(const T *xyz, const size_t nsamples, - bool compute_with_gradients, - bool compute_with_hessian, T *sph, T *dsph, - T *ddsph, void *cuda_stream) { +void SphericalHarmonics::compute(const T * /*xyz*/, size_t /*nsamples*/, + bool /*compute_with_gradients*/, + bool /*compute_with_hessian*/, T * /*sph*/, + T * /*dsph*/, T * /*ddsph*/, + void * /*cuda_stream*/) { throw std::runtime_error("sphericart was not compiled with CUDA support"); }