From 41752c5a36ac6e88d79b2d3096710a746f0ff6d9 Mon Sep 17 00:00:00 2001 From: Gabriel Santamaria Date: Mon, 18 Nov 2024 12:57:25 +0100 Subject: [PATCH] Ubuntu 4.x build fix. MacOS fix attempt. --- src/owl/dune | 1 + src/owl/fftpack/owl_fftpack_float32.cc | 8 ++++++++ src/owl/fftpack/owl_fftpack_float64.cc | 8 ++++++++ src/owl/fftpack/owl_fftpack_impl.h | 8 ++++++++ 4 files changed, 25 insertions(+) diff --git a/src/owl/dune b/src/owl/dune index 0bd4c0914..1aa0bbd45 100644 --- a/src/owl/dune +++ b/src/owl/dune @@ -52,6 +52,7 @@ owl_fftpack_float64) (flags :standard + -std=c++11 (:include c_flags.sexp))) (foreign_stubs (language c) diff --git a/src/owl/fftpack/owl_fftpack_float32.cc b/src/owl/fftpack/owl_fftpack_float32.cc index c50778385..f18d99ae7 100644 --- a/src/owl/fftpack/owl_fftpack_float32.cc +++ b/src/owl/fftpack/owl_fftpack_float32.cc @@ -10,6 +10,14 @@ extern "C" { #include "owl_core.h" + value float32_cfft(value vForward, value vX, value vY, value vD, value vNorm, value vNthreads); + value float32_cfft_bytecode(value *argv, int argn); + value float32_rfftf(value vX, value vY, value vD, value vNorm, value vNthreads); + value float32_rfftb(value vX, value vY, value vD, value vNorm, value vNthreads); + value float32_dct(value vX, value vY, value vD, value vType, value vNorm, value vOrtho, value vNthreads); + value float32_dct_bytecode(value *argv, int argn); + value float32_dst(value vX, value vY, value vD, value vType, value vNorm, value vOrtho, value vNthreads); + value float32_dst_bytecode(value *argv, int argn); } #define REAL_COPY owl_float32_copy diff --git a/src/owl/fftpack/owl_fftpack_float64.cc b/src/owl/fftpack/owl_fftpack_float64.cc index b34050df0..2051941c9 100644 --- a/src/owl/fftpack/owl_fftpack_float64.cc +++ b/src/owl/fftpack/owl_fftpack_float64.cc @@ -9,6 +9,14 @@ extern "C" { #include "owl_core.h" + value float64_cfft(value vForward, value vX, value vY, value vD, value vNorm, value vNthreads); + value float64_cfft_bytecode(value *argv, int argn); + value float64_rfftf(value vX, value vY, value vD, value vNorm, value vNthreads); + value float64_rfftb(value vX, value vY, value vD, value vNorm, value vNthreads); + value float64_dct(value vX, value vY, value vD, value vType, value vNorm, value vOrtho, value vNthreads); + value float64_dct_bytecode(value *argv, int argn); + value float64_dst(value vX, value vY, value vD, value vType, value vNorm, value vOrtho, value vNthreads); + value float64_dst_bytecode(value *argv, int argn); } #define REAL_COPY owl_float64_copy diff --git a/src/owl/fftpack/owl_fftpack_impl.h b/src/owl/fftpack/owl_fftpack_impl.h index 4f6018e35..3def4d2e4 100644 --- a/src/owl/fftpack/owl_fftpack_impl.h +++ b/src/owl/fftpack/owl_fftpack_impl.h @@ -5,8 +5,16 @@ #ifdef Treal +#ifdef CAML_COMPATIBILITY_H +#undef invalid_argument /* For version < 5.0 of the OCaml compiler, allowing std::invalid_argument to be used */ +#endif + #include "pocketfft_hdronly.h" +#ifdef CAML_COMPATIBILITY_H +#define invalid_argument caml_invalid_argument +#endif + /** Owl's interface function to pocketfft **/ /** Adapted from scipy's pypocketfft.cxx **/