fast.helpers

Helper functions that serve general purposes.

Members

Aliases

clz
alias clz = __builtin_clz
Undocumented in source.
moveMask
alias moveMask = __builtin_ia32_pmovmskb128
Undocumented in source.

Enums

forceinline
enum forceinline
Undocumented in source.
noinline
enum noinline
Undocumented in source.
sse4
enum sse4
Undocumented in source.

Functions

alignPtrNext
T* alignPtrNext(T* ptr, size_t pot)

Aligns a pointer to the closest multiple of pot (a power of two), which is equal to or larger than value.

bsf
int bsf(ulong u)
Undocumented in source. Be warned that the author may not have intended to support it.
bsr
int bsr(ulong u)
Undocumented in source. Be warned that the author may not have intended to support it.
clz
ubyte clz(U u)

Count leading zeroes.

clz
ubyte clz(ulong u)
Undocumented in source. Be warned that the author may not have intended to support it.
clz
ubyte clz(ulong u)
Undocumented in source. Be warned that the author may not have intended to support it.
clz
ubyte clz(U u)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfeJoin
enum ctfeJoin(string fmt, string joiner)

Generates a mixin string for repeating code. It can be used to unroll variadic arguments. A format string is instantiated a certain number times with an incrementing parameter. The results are then concatenated using an optional joiner.

getUDA
enum getUDA()
Undocumented in source. Be warned that the author may not have intended to support it.
moveMask
uint moveMask(ubyte16 )
Undocumented in source.

Manifest constants

forceinline
enum forceinline;
Undocumented in source.
hasSSE2
enum hasSSE2;
Undocumented in source.
hasSSE2
enum hasSSE2;
Undocumented in source.
inlineFalse
enum inlineFalse;

Helper mixins to force enable/diasble inlining via pragma on recent compilers.

inlineTrue
enum inlineTrue;

Helper mixins to force enable/diasble inlining via pragma on recent compilers.

isAMD64
enum isAMD64;
Undocumented in source.
isAMD64
enum isAMD64;
Undocumented in source.
isDMD
enum isDMD;
Undocumented in source.
isDMD
enum isDMD;
Undocumented in source.
isDMD
enum isDMD;
Undocumented in source.
isGDC
enum isGDC;
Undocumented in source.
isGDC
enum isGDC;
Undocumented in source.
isGDC
enum isGDC;
Undocumented in source.
isLDC
enum isLDC;
Undocumented in source.
isLDC
enum isLDC;
Undocumented in source.
isLDC
enum isLDC;
Undocumented in source.
isPIC
enum isPIC;
Undocumented in source.
isPIC
enum isPIC;
Undocumented in source.
isPosix
enum isPosix;
Undocumented in source.
isPosix
enum isPosix;
Undocumented in source.
isRelease
enum isRelease;
Undocumented in source.
isRelease
enum isRelease;
Undocumented in source.
isX86
enum isX86;
Undocumented in source.
isX86
enum isX86;
Undocumented in source.
noinline
enum noinline;
Undocumented in source.
sse4
enum sse4;
Undocumented in source.

Properties

isPowerOf2
bool isPowerOf2 [@property getter]

Returns whether the (positive) argument is an integral power of two.

Templates

FieldNameTuple
template FieldNameTuple(T)

Get as an expression tuple the names of the fields of a struct, class, or union. This consists of the fields that take up memory space, excluding the hidden fields like the virtual function table pointer or a context pointer for nested types. If T isn't a struct, class, or union returns an expression tuple with an empty string.

SIMDFromScalar
template SIMDFromScalar(V, alias scalar)
Undocumented in source.
SIMDFromString
template SIMDFromString(string str)
Undocumented in source.
UnsignedOf
template UnsignedOf(I)

For any integral type, returns the unsigned type of the same bit-width.

staticIota
template staticIota(int beg, int end)
Undocumented in source.

Meta