The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
oft_sort Module Reference

Detailed Description

Portable array sorting and search functions.

Note
On Intel compilers binary sort and search are used. Otherwise C++ templated sort search functions defined in c_sort.cxx are used.
Author
Chris Hansen
Date
June 2010

Data Types

interface  int_search44
 
interface  int_search48
 
interface  int_search84
 
interface  int_search88
 
interface  int_sort44
 
interface  int_sort48
 
interface  int_sort84
 
interface  int_sort88
 
interface  search_array
 Search a sorted integer array. More...
 
interface  sort_array
 Sort an array in ascending order. More...
 
interface  sort_matrix
 Sort rows of a matrix and associated index vector by the first column in ascending order. More...
 

Functions/Subroutines

integer(i4) function search4 (item, list, n)
 Search for a value in a sorted integer array.
 
integer(i8) function search8 (item, list, n)
 Search for a value in a sorted integer array.
 
subroutine sort4 (ia, n)
 Sorts an int4 vector.
 
subroutine sort8 (ia, n)
 Sorts an int8 vector.
 
subroutine sorta4 (ia, n, m)
 Sorts an int4 MxN array.
 
subroutine sorta8 (ia, n, m)
 Sorts an int8 MxN array.
 

Function/Subroutine Documentation

◆ search4()

integer(i4) function search4 ( integer(i4), intent(in)  item,
integer(i4), dimension(n), intent(in)  list,
integer(i4), intent(in)  n 
)
private

Search for a value in a sorted integer array.

Returns
Index of item in array
Parameters
[in]itemValue to search for
[in]listArray to search [n]
[in]nSize of array

◆ search8()

integer(i8) function search8 ( integer(i8), intent(in)  item,
integer(i8), dimension(n), intent(in)  list,
integer(i8), intent(in)  n 
)
private

Search for a value in a sorted integer array.

Returns
Index of item in array
Parameters
[in]itemValue to search for
[in]listArray to search [n]
[in]nSize of array

◆ sort4()

subroutine sort4 ( integer(i4), dimension(n), intent(inout)  ia,
integer(i4), intent(in)  n 
)
private

Sorts an int4 vector.

Note
This function should not be called directly, use the oft_sort interface

◆ sort8()

subroutine sort8 ( integer(i8), dimension(n), intent(inout)  ia,
integer(i8), intent(in)  n 
)
private

Sorts an int8 vector.

Note
This function should not be called directly, use the oft_sort interface

◆ sorta4()

subroutine sorta4 ( integer(i4), dimension(n,m), intent(inout)  ia,
integer(i4), intent(in)  n,
integer(i4), intent(in)  m 
)
private

Sorts an int4 MxN array.

Note
This function should not be called directly, use the oft_sort interface

◆ sorta8()

subroutine sorta8 ( integer(i8), dimension(n,m), intent(inout)  ia,
integer(i8), intent(in)  n,
integer(i8), intent(in)  m 
)
private

Sorts an int8 MxN array.

Note
This function should not be called directly, use the oft_sort interface