dg2d.misc

Miscelanious stuff.

Copyright Chris Jones 2020. Distributed under the Boost Software License, Version 1.0. See accompanying file Licence.txt or copy at... https://www.boost.org/LICENSE_1_0.txt

Public Imports

inteli
public import inteli;
std.math
public import std.math : sqrt, abs;

Members

Aliases

fabs
alias fabs = llvm_fabs

Undocumented in source.

intr_bsf
alias intr_bsf = llvm_ctlz

Undocumented in source.

intr_bsr
alias intr_bsr = llvm_cttz

Undocumented in source.

Functions

clip
T clip(T x, T min, T max)

Undocumented in source. Be warned that the author may not have intended to support it.

dg2dFree
void dg2dFree(void* ptr)

Undocumented in source. Be warned that the author may not have intended to support it.

dg2dMalloc
T* dg2dMalloc(size_t length)

Undocumented in source. Be warned that the author may not have intended to support it.

dg2dRealloc
T* dg2dRealloc(T* ptr, size_t length)

Undocumented in source. Be warned that the author may not have intended to support it.

intr_bsr
T intr_bsr(T src, bool isZeroUndefined)

Undocumented in source. Be warned that the author may not have intended to support it.

isPow2
bool isPow2(int x)

Undocumented in source. Be warned that the author may not have intended to support it.

loadFileMalloc
ubyte[] loadFileMalloc(string filename)

Undocumented in source. Be warned that the author may not have intended to support it.

max
T max(T a, T b)

Undocumented in source. Be warned that the author may not have intended to support it.

min
T min(T a, T b)

Undocumented in source. Be warned that the author may not have intended to support it.

nextSetBit
int nextSetBit(ulong* mask, int start, int end)

nextSetBit, searches the bit mask for the next set bit.

nextSetBit
int nextSetBit(uint* mask, int start, int end)

Undocumented in source. Be warned that the author may not have intended to support it.

readCycleCounter
long readCycleCounter()

Undocumented in source. Be warned that the author may not have intended to support it.

readCycleCounter
long readCycleCounter()

Undocumented in source. Be warned that the author may not have intended to support it.

roundUpPow2
uint roundUpPow2(uint x)

Undocumented in source. Be warned that the author may not have intended to support it.

roundUpPow2
ulong roundUpPow2(ulong x)

Undocumented in source. Be warned that the author may not have intended to support it.

roundUpTo
uint roundUpTo(uint x, uint q)

Undocumented in source. Be warned that the author may not have intended to support it.

sqr
T sqr(T x)

Undocumented in source. Be warned that the author may not have intended to support it.

swap
void swap(T a, T b)

Undocumented in source. Be warned that the author may not have intended to support it.

Structs

ArenaAllocator
struct ArenaAllocator(T, uint blockSize)

Undocumented in source.

Array
struct Array(T, bool voidInit = false)

Undocumented in source.

Variables

isFloatDoubleInt
enum bool isFloatDoubleInt(T);

Undocumented in source.

isFloatOrDouble
enum bool isFloatOrDouble(T);

Undocumented in source.

Meta