Skip to content

Commit

Permalink
Update for correct template types and improved location for CODI_Unli…
Browse files Browse the repository at this point in the history
…kely.
  • Loading branch information
MaxSagebaum committed Jul 8, 2024
1 parent 19dce82 commit b1be990
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/codi/tapes/commonTapeImplementation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ namespace codi {
func.template call<callType>(&impl, dataView, std::forward<Args>(args)...);

codiAssert(endPos == dataView.getPosition());
} else if (LowLevelFunctionEntryCallKind::Delete == callType) {
} else CODI_Unlikely if (LowLevelFunctionEntryCallKind::Delete == callType) {
// No delete registered. Data is skiped by the curLLFByteDataPos update.
} else {
CODI_EXCEPTION("Requested call is not supported for low level function with token '%d'.", (int)id);
Expand Down
2 changes: 1 addition & 1 deletion include/codi/tapes/jacobianBaseTape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ namespace codi {

CODI_NO_INLINE void internalResizeAdjointsVector() {
// overallocate as next multiple of Config::ChunkSize
adjoints.resize((int)getNextMultiple((size_t)indexManager.get().getLargestCreatedIndex() + 1, Config::ChunkSize));
adjoints.resize(getNextMultiple(indexManager.get().getLargestCreatedIndex() + 1, (Identifier)Config::ChunkSize));
}
};
}
2 changes: 1 addition & 1 deletion include/codi/tapes/jacobianLinearTape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace codi {
// curAdjointPos at the end of the loop.

EventSystem<JacobianLinearTape>::notifyStatementEvaluateListeners(
tape, (int)curAdjointPos, GradientTraits::dim<Adjoint>(), GradientTraits::toArray(lhsAdjoint).data());
tape, (Identifier)curAdjointPos, GradientTraits::dim<Adjoint>(), GradientTraits::toArray(lhsAdjoint).data());

if (Config::ReversalZeroesAdjoints) {
adjointVector[curAdjointPos] = Adjoint();
Expand Down

0 comments on commit b1be990

Please sign in to comment.