2023-08-29 12:57:46 +02:00
|
|
|
"""
|
|
|
|
copy(t::AbstractDataTask)
|
|
|
|
|
|
|
|
Fallback implementation of the copy of an abstract data task, throwing an error.
|
|
|
|
"""
|
2023-10-12 17:51:03 +02:00
|
|
|
copy(t::AbstractDataTask) = error("Need to implement copying for your data tasks!")
|
2023-08-29 12:57:46 +02:00
|
|
|
|
|
|
|
"""
|
|
|
|
copy(t::AbstractComputeTask)
|
|
|
|
|
|
|
|
Return a copy of the given compute task.
|
|
|
|
"""
|
|
|
|
copy(t::AbstractComputeTask) = typeof(t)()
|
2023-10-12 17:51:03 +02:00
|
|
|
|
|
|
|
"""
|
|
|
|
copy(t::FusedComputeTask)
|
|
|
|
|
|
|
|
Return a copy of th egiven [`FusedComputeTask`](@ref).
|
|
|
|
"""
|
|
|
|
function copy(t::FusedComputeTask{T1, T2}) where {T1, T2}
|
|
|
|
return FusedComputeTask{T1, T2}(
|
|
|
|
copy(t.first_task),
|
|
|
|
copy(t.second_task),
|
|
|
|
copy(t.t1_inputs),
|
|
|
|
t.t1_output,
|
|
|
|
copy(t.t2_inputs),
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
FusedComputeTask{T1, T2}(t1_inputs::Vector{String}, t1_output::String, t2_inputs::Vector{String}) where {T1, T2} =
|
|
|
|
FusedComputeTask{T1, T2}(T1(), T2(), t1_inputs, t1_output, t2_inputs)
|