Fused partial+sum for sum_all: output(:,1) = upstream_grad(1,1)*num_samples
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_type), | intent(in) | :: | this | |||
| real(kind=real32), | intent(in), | dimension(:,:) | :: | upstream_grad | ||
| real(kind=real32), | intent(out), | dimension(:) | :: | output |
pure subroutine get_partial_sum_all_val_sum(this, upstream_grad, output) !! Fused partial+sum for sum_all: output(:,1) = upstream_grad(1,1)*num_samples implicit none class(array_type), intent(in) :: this real(real32), dimension(:,:), intent(in) :: upstream_grad real(real32), dimension(:), intent(out) :: output output(:) = upstream_grad(1,1) * real(size(upstream_grad, 2), real32) end subroutine get_partial_sum_all_val_sum