Skip to content

Commit

Permalink
ADMconstraints: update admconstraints.cxx
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Nov 18, 2024
1 parent 49cf5bf commit e0141d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ADMconstraints/src/admconstraints.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ namespace ADMconstraints {
using namespace Arith;
using namespace Loop;

template <typename T>
CCTK_DEVICE CCTK_HOST CCTK_ATTRIBUTE_ALWAYS_INLINE inline T Power(T x, int y) {
return (y == 2) ? Arith::pow2(x) : Arith::pown(x, y);
}

extern "C" void ADMconstraints(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTSX_ADMconstraints;
DECLARE_CCTK_PARAMETERS;
Expand Down

0 comments on commit e0141d5

Please sign in to comment.