get_sample Interface

private interface get_sample

Functions

private module function get_sample_array(input, start_index, end_index, batch_size, as_graph) result(sample)

Get sample for mixed input

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), dimension(:,:) :: input

Input array

integer, intent(in) :: start_index

Start and end indices

integer, intent(in) :: end_index

Start and end indices

integer, intent(in) :: batch_size

Batch size

logical, intent(in) :: as_graph

Boolean whether to treat the input as a graph

Return Value type(array_type), dimension(:,:), allocatable

Sample array

private module function get_sample_flang(input, start_index, end_index, batch_size) result(sample)

Get a sample from a rank

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in), dimension(..) :: input

Input array

integer, intent(in) :: start_index

Start and end indices

integer, intent(in) :: end_index

Start and end indices

integer, intent(in) :: batch_size

Batch size

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

Sample array

private module function get_sample_graph1d(input, start_index, end_index, batch_size) result(sample)

Get sample for graph input

Arguments

Type IntentOptional Attributes Name
class(graph_type), intent(in), dimension(:) :: input

Input array

integer, intent(in) :: start_index

Start and end indices

integer, intent(in) :: end_index

Start and end indices

integer, intent(in) :: batch_size

Batch size

Return Value type(graph_type), dimension(1, batch_size)

Sample array

private module function get_sample_graph2d(input, start_index, end_index, batch_size) result(sample)

Get sample for graph input

Arguments

Type IntentOptional Attributes Name
class(graph_type), intent(in), dimension(:,:) :: input

Input array

integer, intent(in) :: start_index

Start and end indices

integer, intent(in) :: end_index

Start and end indices

integer, intent(in) :: batch_size

Batch size

Return Value type(graph_type), dimension(size(input,1), batch_size)

Sample array

private module function get_sample_ptr(input, start_index, end_index, batch_size) result(sample_ptr)

Get a sample from a rank

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in), dimension(..), target :: input

Input array

integer, intent(in) :: start_index

Start and end indices

integer, intent(in) :: end_index

Start and end indices

integer, intent(in) :: batch_size

Batch size

Return Value real(kind=real32), pointer, (:,:)

Pointer to sample