Merge two autodiff arrays based on a mask
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | tsource | |||
| class(array_type), | intent(in), | target | :: | fsource | ||
| logical, | intent(in), | dimension(:,:) | :: | mask |
function scalar_merge(tsource, fsource, mask) result(c) !! Merge two autodiff arrays based on a mask implicit none real(real32), intent(in) :: tsource class(array_type), intent(in), target :: fsource logical, dimension(:,:), intent(in) :: mask type(array_type), pointer :: c c => merge_scalar(fsource, tsource, .not.mask) end function scalar_merge