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 Oct 21, 2024
1 parent 981ae40 commit 8258bc9
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 8258bc9

Please sign in to comment.