forward_pad1d Subroutine

private subroutine forward_pad1d(this, input)

Forward propagation

Type Bound

pad1d_layer_type

Arguments

Type IntentOptional Attributes Name
class(pad1d_layer_type), intent(inout) :: this

Instance of the 1D padding layer

class(array_type), intent(in), dimension(:,:) :: input

Input values


Source Code

  subroutine forward_pad1d(this, input)
    !! Forward propagation
    implicit none

    ! Arguments
    class(pad1d_layer_type), intent(inout) :: this
    !! Instance of the 1D padding layer
    class(array_type), dimension(:,:), intent(in) :: input
    !! Input values

    ! Local variables
    type(array_type), pointer :: ptr
    !! Pointer array


    call this%output(1,1)%zero_grad()
    ptr => pad1d(input(1,1), this%facets(1), this%pad(1), this%imethod)
    call this%output(1,1)%assign_and_deallocate_source(ptr)
    this%output(1,1)%is_temporary = .false.

  end subroutine forward_pad1d