Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_LowLevel🞂GetOptimalReflectFunction

GetOptimalReflect

Determines whether to return standard Reflect or bitwise optimized ReflectPow2.

Declarations ​

pascal
function GetOptimalReflect(Max: Integer): TWrapProc; overload;
function GetOptimalReflect(Min, Max: Integer): TWrapProcEx; overload;
Overload Details

Overload 1 ​

pascal
function GetOptimalReflect(Max: Integer): TWrapProc; overload;

Returns optimal TWrapProc delegate for reflection in range [0..Max].

ParameterTypeDescription
MaxIntegerUpper range boundary.
TypeDescription
TWrapProcReflect procedure delegate (Reflect or ReflectPow2).

Overload 2 ​

pascal
function GetOptimalReflect(Min, Max: Integer): TWrapProcEx; overload;

Returns optimal TWrapProcEx delegate for reflection in range [Min..Max].

ParameterTypeDescription
MinIntegerLower range boundary.
MaxIntegerUpper range boundary.
TypeDescription
TWrapProcExReflect procedure delegate (Reflect or ReflectPow2).

Description ​

GetOptimalReflect tests whether the specified range length is a power of two and returns either ReflectPow2 or Reflect.

See also ​