Skip to content

Commit

Permalink
[batch] add macro indirection
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Ribizel <[email protected]>
  • Loading branch information
MarcelKoch and upsj committed Nov 6, 2024
1 parent 1f26da1 commit 45e6a9b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions core/solver/batch_dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,16 @@ enum class log_type { simple_convergence_completion };
} // namespace log


#define GKO_BATCH_INSTANTIATE_STOP(macro, ...) \
macro(__VA_ARGS__, \
::gko::batch::solver::device::batch_stop::SimpleAbsResidual); \
template macro( \
__VA_ARGS__, \
::gko::batch::solver::device::batch_stop::SimpleRelResidual)
#define GKO_INDIRECT(...) __VA_ARGS__


#define GKO_BATCH_INSTANTIATE_STOP(macro, ...) \
GKO_INDIRECT( \
macro(__VA_ARGS__, \
::gko::batch::solver::device::batch_stop::SimpleAbsResidual)); \
template GKO_INDIRECT( \
macro(__VA_ARGS__, \
::gko::batch::solver::device::batch_stop::SimpleRelResidual))

#define GKO_BATCH_INSTANTIATE_PRECONDITIONER(macro, ...) \
GKO_BATCH_INSTANTIATE_STOP( \
Expand Down

0 comments on commit 45e6a9b

Please sign in to comment.