Return the index of a node with exact name match, or zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(onnx_node_type), | intent(in) | :: | nodes(:) |
Parsed ONNX nodes |
||
| integer, | intent(in) | :: | num_nodes |
Number of valid node entries |
||
| character(len=*), | intent(in) | :: | name |
Exact node name to search for |
Return value: index of the matching node, or zero if not found
function find_gnn_node(nodes, num_nodes, name) result(idx) !! Return the index of a node with exact name match, or zero. implicit none ! Arguments type(onnx_node_type), intent(in) :: nodes(:) !! Parsed ONNX nodes integer, intent(in) :: num_nodes !! Number of valid node entries character(*), intent(in) :: name !! Exact node name to search for integer :: idx !! Return value: index of the matching node, or zero if not found ! Local variables integer :: i idx = 0 do i = 1, num_nodes if(trim(nodes(i)%name) .eq. trim(name))then idx = i return end if end do end function find_gnn_node