diffstruc__operations_reduction Module

This module contains reduction operations for the diffstruc library.


Uses


Interfaces

public interface max

  • private function max_array(a, b) result(c)

    Find maximum value between two autodiff arrays

    Arguments

    Type IntentOptional Attributes Name
    class(array_type), intent(in), target :: a
    class(array_type), intent(in), target :: b

    Return Value type(array_type), pointer

  • private function max_scalar(a, scalar) result(c)

    Find maximum value between an autodiff array and a scalar

    Arguments

    Type IntentOptional Attributes Name
    class(array_type), intent(in), target :: a
    real(kind=real32), intent(in) :: scalar

    Return Value type(array_type), pointer

public interface maxval

  • private function maxval_array(a, dim) result(c)

    Find maximum value along a dimension

    Arguments

    Type IntentOptional Attributes Name
    class(array_type), intent(in), target :: a
    integer, intent(in) :: dim

    Return Value real(kind=real32), dimension(:), allocatable


Functions

private function get_partial_max_left(this, upstream_grad) result(output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

private function get_partial_max_right(this, upstream_grad) result(output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)

private function max_array(a, b) result(c)

Find maximum value between two autodiff arrays

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: a
class(array_type), intent(in), target :: b

Return Value type(array_type), pointer

private function max_scalar(a, scalar) result(c)

Find maximum value between an autodiff array and a scalar

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: a
real(kind=real32), intent(in) :: scalar

Return Value type(array_type), pointer

private function maxval_array(a, dim) result(c)

Find maximum value along a dimension

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: a
integer, intent(in) :: dim

Return Value real(kind=real32), dimension(:), allocatable


Subroutines

private pure subroutine get_partial_max_left_val(this, upstream_grad, output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output

private pure subroutine get_partial_max_right_val(this, upstream_grad, output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this
real(kind=real32), intent(in), dimension(:,:) :: upstream_grad
real(kind=real32), intent(out), dimension(:,:) :: output