Skip to content

Commit

Permalink
It seems that FPGA does not like constexpr.
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-paul-mueller committed Nov 15, 2024
1 parent 85d3df3 commit 90160d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion dace/runtime/include/dace/nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions dace/runtime/include/dace/pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 90160d5

Please sign in to comment.