abstract type AbstractTask end abstract type AbstractComputeTask <: AbstractTask end abstract type AbstractDataTask <: AbstractTask end struct DataTask <: AbstractDataTask data::UInt64 end # S task with 1 child struct ComputeTaskS1 <: AbstractComputeTask end # S task with 2 children struct ComputeTaskS2 <: AbstractComputeTask end # P task with 0 children struct ComputeTaskP <: AbstractComputeTask end # v task with 2 children struct ComputeTaskV <: AbstractComputeTask end # u task with 1 child struct ComputeTaskU <: AbstractComputeTask end # task that sums all its inputs, n children struct ComputeTaskSum <: AbstractComputeTask end struct FusedComputeTask{T1<:AbstractComputeTask, T2<:AbstractComputeTask} <: AbstractComputeTask end get_types(::FusedComputeTask{T1, T2}) where {T1, T2} = (T1, T2)