diffstruc__operations_broadcast_sub Submodule

Submodule containing implementations of broadcast operations


Uses


Functions

function get_partial_concat_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)

function get_partial_concat_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)

function get_partial_index(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)

function get_partial_pack_indices(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)

function get_partial_pack_mask(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)

function get_partial_reshape(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)

function get_partial_unpack_indices(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)

function get_partial_unpack_mask(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)


Subroutines

pure subroutine get_partial_concat_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

pure subroutine get_partial_concat_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

pure subroutine get_partial_pack_indices_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

pure subroutine get_partial_pack_mask_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

pure subroutine get_partial_reshape_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

Module Functions

module function concat_arrays(a, b, dim) result(c)

Concatenate two autodiff arrays along the first dimension

Arguments

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

Return Value type(array_type), pointer

module function index_array(a, indices) result(c)

Index an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function ltrim_array(a, b, dim) result(c)

Left trim an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function pack_indices_array(a, indices, dim) result(c)

Pack an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function pack_mask_array(a, dim, mask) result(c)

Pack an autodiff array using a logical mask

Arguments

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

Return Value type(array_type), pointer

module function reshape_array(a, new_shape) result(c)

Reshape an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function reverse_index_array(a, indices, from, new_index_size) result(c)

Index an autodiff array

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: a
integer, intent(in), dimension(:) :: indices
logical, intent(in) :: from
integer, intent(in) :: new_index_size

Return Value type(array_type), pointer

module function rtrim_array(a, b, dim) result(c)

Right trim an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function slice_left_array(a, b, dim) result(c)

Left trim an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function slice_right_array(a, b, dim) result(c)

Right trim an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function unpack_indices_array(a, indices, dim, new_size) result(c)

Unpack an autodiff array

Arguments

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

Return Value type(array_type), pointer

module function unpack_mask_array(a, array_shape, dim, indices) result(c)

Unpack an autodiff array

Arguments

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

Return Value type(array_type), pointer