unary_transforms_procedures Submodule

Contains the implementations of various unary transform routines


Uses


Module Functions

pure module function unaryLog(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for natural log. String name "log".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryExp(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for exp. String name "exp".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unarySin(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for sin. String name "sin".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryCos(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for cos. String name "cos".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryAbs(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for absolute value. String name "abs".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unarySign(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for sign function. String name "sign".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryTan(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for tan. String name "tan".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryAsin(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for arcsin. String name "asin".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryAcos(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for arccos. String name "acos".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryAtan(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for arctan. String name "atan".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryErf(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for the error function. String name "erf".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryErfc(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for the complementary error function. String name "erfc".

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryPowReal(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for the raising to a real power. String name "rpow". Uses realParams(1) as the power.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryPowInt(input, realParams, intParams, logicalParams) result(output)

Unary wrapper for the raising to an integer power. String name "ipow". Uses intParams(1) as the power.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryShift(input, realParams, intParams, logicalParams) result(output)

Unary wrapper cyclically permuting input. String name "shift". Uses intParams(1) as the shift amount.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryContract(input, realParams, intParams, logicalParams) result(output)

Unary wrapper contracting an array with a smaller array. String name "cont". Uses realParams as the contracting array. After contraction it uses intParams(1) to determine the expected output size. The input array should be evenly divided by size(realParams) and intParams(1). intParams(2) is then used to determine which sub-array of size intParams(1) is returned

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)

pure module function unaryExpand(input, realParams, intParams, logicalParams) result(output)

Unary wrapper expanding an array with another array. String name "expand". Uses realParams as the expanding array. After expansion it uses intParams(1) to determine how many times the result should be copied. The result is output((i-1)size(input)size(realParams)+(j-1)size(realParams)+k) = input(j)realParams(k) where j=1,size(input) and i=1,intParams(1)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: input
real(kind=rk), intent(in), optional, dimension(:) :: realParams
integer(kind=ik), intent(in), optional, dimension(:) :: intParams
logical, intent(in), optional, dimension(:) :: logicalParams

Return Value real(kind=rk), allocatable, dimension(:)


Module Subroutines

module subroutine associateFunctionPointer(name, funcPointer)

Returns a function pointer to a unary transformation based on a string name

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name
procedure(realArrayFunctionGenParam), intent(inout), pointer :: funcPointer