emit_edge_index_component Subroutine

public subroutine emit_edge_index_component(tp, edge_index_in, index_name, tag, component_out, nodes, num_nodes)

Gather one edge_index row and squeeze it into a vector.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: tp
character(len=*), intent(in) :: edge_index_in
character(len=*), intent(in) :: index_name
character(len=*), intent(in) :: tag
character(len=128), intent(out) :: component_out
type(onnx_node_type), intent(inout), dimension(:) :: nodes
integer, intent(inout) :: num_nodes

Source Code

  subroutine emit_edge_index_component( &
       tp, edge_index_in, index_name, tag, component_out, &
       nodes, num_nodes)
    !! Gather one edge_index row and squeeze it into a vector.
    implicit none

    ! Arguments
    character(*), intent(in) :: tp, edge_index_in, index_name, tag
    character(128), intent(out) :: component_out
    type(onnx_node_type), intent(inout), dimension(:) :: nodes
    integer, intent(inout) :: num_nodes

    ! Local variables
    character(128) :: raw_name

    write(raw_name, '(A,"_",A,"_raw")') trim(tp), trim(tag)
    write(component_out, '(A,"_",A)') trim(tp), trim(tag)
    call emit_node('Gather', trim(tp)//'_gather_'//trim(tag), &
         trim(raw_name), onnx_axis0_attr, nodes, num_nodes, &
         in1=trim(edge_index_in), in2=trim(index_name))
    call emit_squeeze_node(trim(tp)//'_sq_'//trim(tag), &
         trim(raw_name), trim(tp)//'_idx0', trim(component_out), &
         nodes, num_nodes)

  end subroutine emit_edge_index_component