From 37d8951a74a563372963e1cf0a2f1310fbcbfd7d Mon Sep 17 00:00:00 2001 From: juanlucasrey Date: Mon, 8 Jul 2024 18:22:21 +0100 Subject: [PATCH] rsat fixes --- include/codi/tapes/commonTapeImplementation.hpp | 4 ++-- include/codi/tapes/jacobianBaseTape.hpp | 2 +- include/codi/tapes/jacobianLinearTape.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/codi/tapes/commonTapeImplementation.hpp b/include/codi/tapes/commonTapeImplementation.hpp index e02adc9b..960fe854 100644 --- a/include/codi/tapes/commonTapeImplementation.hpp +++ b/include/codi/tapes/commonTapeImplementation.hpp @@ -535,9 +535,9 @@ namespace codi { func.template call(&impl, dataView, std::forward(args)...); codiAssert(endPos == dataView.getPosition()); - } else if (LowLevelFunctionEntryCallKind::Delete == callType) CODI_Unlikely { + } else CODI_Unlikely if (LowLevelFunctionEntryCallKind::Delete == callType) { // No delete registered. Data is skiped by the curLLFByteDataPos update. - } else CODI_Unlikely { + } else { CODI_EXCEPTION("Requested call is not supported for low level function with token '%d'.", (int)id); } diff --git a/include/codi/tapes/jacobianBaseTape.hpp b/include/codi/tapes/jacobianBaseTape.hpp index cf43d0ed..16778ce0 100644 --- a/include/codi/tapes/jacobianBaseTape.hpp +++ b/include/codi/tapes/jacobianBaseTape.hpp @@ -867,7 +867,7 @@ namespace codi { CODI_NO_INLINE void internalResizeAdjointsVector() { // overallocate as next multiple of Config::ChunkSize - adjoints.resize(getNextMultiple((size_t)indexManager.get().getLargestCreatedIndex() + 1, Config::ChunkSize)); + adjoints.resize(getNextMultiple(indexManager.get().getLargestCreatedIndex() + 1, (Identifier)Config::ChunkSize)); } }; } diff --git a/include/codi/tapes/jacobianLinearTape.hpp b/include/codi/tapes/jacobianLinearTape.hpp index e46ce4e9..6552549b 100644 --- a/include/codi/tapes/jacobianLinearTape.hpp +++ b/include/codi/tapes/jacobianLinearTape.hpp @@ -200,7 +200,7 @@ namespace codi { // curAdjointPos at the end of the loop. EventSystem::notifyStatementEvaluateListeners( - tape, curAdjointPos, GradientTraits::dim(), GradientTraits::toArray(lhsAdjoint).data()); + tape, (Identifier)curAdjointPos, GradientTraits::dim(), GradientTraits::toArray(lhsAdjoint).data()); if (Config::ReversalZeroesAdjoints) { adjointVector[curAdjointPos] = Adjoint();