Datatypes & Common Macros

type complex128_t
[source]

128bit complex number (two 64bit floating point numbers)

type complex64_t
[source]

64bit complex number (two 32bit floating point numbers)

type gf_complex_t
[source]

Green’s function complex type. uses complex128_t if USE_GF_FLOATS is not defined. Otherwise, complex64_t is used

type index_t
[source]

64bit signed integer

type uindex_t
[source]

64bit unsigned integer

POW2(x)
[source]

simple power of 2 as macro

POW3(x)
[source]

simple power of 3 as macro

POW4(x)
[source]

simple power of 4 as macro

IDX2(i, j, nj)
[source]

rank-2 tensor index in C-style ordering

IDX3(i, j, k, nj, nk)
[source]

rank-3 tensor index in C-style ordering

IDX4(i, j, k, l, nj, nk, nl)
[source]

rank-4 tensor index in C-style ordering

IDX5(i, j, k, l, m, nj, nk, nl, nm)
[source]

rank-5 tensor index in C-style ordering

IDX6(i, j, k, l, m, n, nj, nk, nl, nm, nn)
[source]

rank-6 tensor index in C-style ordering

IDX7(i, j, k, l, m, n, o, nj, nk, nl, nm, nn, no)
[source]

rank-7 tensor index in C-style ordering

IDX8(i, j, k, l, m, n, o, p, nj, nk, nl, nm, nn, no, np)
[source]

rank-8 tensor index in C-style ordering

MAX(x, y)
[source]

maximum element

MIN(x, y)
[source]

minimum element

XORSWAP_UNSAFE(a, b)
[source]

swap operands using the XOR-swap algorithm, fails if applied on the same element.

XORSWAP(a, b)
[source]

swap operands using the XOR-swap algorithm, but first check if their addresses are equal.

XORSWAP_PTR(a, b)
[source]

swap operands using the XOR-swap algorithm, but for pointers (C doesn’t allow ptr1 ^= ptr2, that’s why we need a second macro)

ZERO_OUT(ptr, sz)
[source]

zero out an array of arbitrary POD type (pointed to by ptr) with sz elements by calling memset