From 90160d5e0a9e0d65a23e4849a141de823837ecf8 Mon Sep 17 00:00:00 2001 From: Philip Mueller Date: Fri, 15 Nov 2024 07:34:55 +0100 Subject: [PATCH] It seems that FPGA does not like constexpr. --- dace/runtime/include/dace/nan.h | 5 ++++- dace/runtime/include/dace/pi.h | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dace/runtime/include/dace/nan.h b/dace/runtime/include/dace/nan.h index e4bb8451a1..b4bac93980 100644 --- a/dace/runtime/include/dace/nan.h +++ b/dace/runtime/include/dace/nan.h @@ -16,9 +16,12 @@ namespace dace DACE_CONSTEXPR DACE_HDFI typeless_nan() noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_nan(const typeless_nan&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_nan(typeless_nan&&) noexcept = default; + DACE_HDFI ~typeless_nan() noexcept = default; + +#ifndef DACE_XILINX DACE_CONSTEXPR DACE_HDFI typeless_nan& operator=(const typeless_nan&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_nan& operator=(typeless_nan&&) noexcept = default; - DACE_HDFI ~typeless_nan() noexcept = default; +#endif operator int() const = delete; DACE_CONSTEXPR DACE_HDFI operator float() const diff --git a/dace/runtime/include/dace/pi.h b/dace/runtime/include/dace/pi.h index c5bc1cdf03..818a22f6d0 100644 --- a/dace/runtime/include/dace/pi.h +++ b/dace/runtime/include/dace/pi.h @@ -36,9 +36,12 @@ namespace dace DACE_CONSTEXPR DACE_HDFI typeless_pi_mult(const typeless_pi&) noexcept: typeless_pi_mult(1) {}; DACE_CONSTEXPR DACE_HDFI typeless_pi_mult(const typeless_pi_mult&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi_mult(typeless_pi_mult&&) noexcept = default; + DACE_HDFI ~typeless_pi_mult() noexcept = default; + +#ifndef DACE_XILINX DACE_CONSTEXPR DACE_HDFI typeless_pi_mult& operator=(const typeless_pi_mult&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi_mult& operator=(typeless_pi_mult&&) noexcept = default; - DACE_HDFI ~typeless_pi_mult() noexcept = default; +#endif template< typename T, @@ -70,9 +73,11 @@ namespace dace DACE_CONSTEXPR DACE_HDFI typeless_pi() noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi(const typeless_pi&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi(typeless_pi&&) noexcept = default; + DACE_HDFI ~typeless_pi() noexcept = default; +#ifndef DACE_XILINX DACE_CONSTEXPR DACE_HDFI typeless_pi& operator=(const typeless_pi&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi& operator=(typeless_pi&&) noexcept = default; - DACE_HDFI ~typeless_pi() noexcept = default; +#endif template< typename T, @@ -108,9 +113,12 @@ namespace dace DACE_CONSTEXPR DACE_HDFI typeless_pi_exp(const typeless_pi_exp&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi_exp(typeless_pi_exp&&) noexcept = default; + DACE_HDFI ~typeless_pi_exp() noexcept = default; + +#ifndef DACE_XILINX DACE_CONSTEXPR DACE_HDFI typeless_pi_exp& operator=(const typeless_pi_exp&) noexcept = default; DACE_CONSTEXPR DACE_HDFI typeless_pi_exp& operator=(typeless_pi_exp&&) noexcept = default; - DACE_HDFI ~typeless_pi_exp() noexcept = default; +#endif template< typename T,