use crate::plans::definitions::*;
#[derive(Clone, Debug)]
pub enum PredefinedTargetFunction {
SelfIdxOffset,
}
fn get_host_at_task_idx_offset(ctx: &HostTargetEvalCtx) -> HostTarget {
HostTarget::HostIdx(ctx.hosts[ctx.self_idx % ctx.hosts.len()] as usize)
}
pub(crate) fn compute_host_target<'a>(
using_built_in: &PredefinedTargetFunction,
ctx: &HostTargetEvalCtx,
) -> HostTarget {
match using_built_in {
PredefinedTargetFunction::SelfIdxOffset => get_host_at_task_idx_offset(ctx),
}
}