Why use it
Template dispatch is resolved at compile time and normally adds no runtime indirection.
PSYQO SDK
Function · 3 overloads
Reads safe as part of Geometry Transformation Engine math and register operations.
template <> inline PackedVec3 readSafe<PseudoRegister::LV>()Reads safe as part of Geometry Transformation Engine math and register operations.
This overload takes no parameters.
Returns: PackedVec3. Check the value before continuing when it represents success, availability or a resource handle.
#include "psyqo/gte-registers.hh"
auto result = psyqo::GTE::readSafe();Template dispatch is resolved at compile time and normally adds no runtime indirection.
Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size.
template <> inline PackedVec3 readSafe<PseudoRegister::SV>()Reads safe as part of Geometry Transformation Engine math and register operations.
This overload takes no parameters.
Returns: PackedVec3. Check the value before continuing when it represents success, availability or a resource handle.
#include "psyqo/gte-registers.hh"
auto result = psyqo::GTE::readSafe();Template dispatch is resolved at compile time and normally adds no runtime indirection.
Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size.
template <PseudoRegister reg, bool valid = false> static inline PackedVec3 readSafe()Reads a short vector from a GTE pseudo register, adding nops after the operation.
This overload takes no parameters.
Returns: PackedVec3 — PackedVec3 The vector read from the pseudo register.
#include "psyqo/gte-registers.hh"
// Replace these template arguments with types or values accepted by the declaration:
// reg, valid
auto result = psyqo::GTE::readSafe<reg, valid>();Template dispatch is resolved at compile time and normally adds no runtime indirection.
Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size.
adler32Computes the adler32 checksum of a buffer.Functionadler32_bytesComputes the adler32 checksum of a buffer, only reading bytes.Functionadler32_wordsComputes the adler32 checksum of a buffer, optimized for words.Functionavsz3AVSZ3 - Average of three Z values (for Triangles) zsf3 * (sz0 + sz1 + sz2) -> otz 5 cyclesFunctionavsz4AVSZ4 - Average of four Z values (for Quads) zsf4 * (sz0 + sz1 + sz2 + sz4) -> otz 6 cyclesFunctionbtoiPerforms `btoi` as part of the msf module.FunctionclearClear a GTE register.Function templatecubicCubic Bezier curve helper function.FunctiondDivPerforms `d div` as part of the fixed point module.FunctioniDivPerforms `i div` as part of the fixed point module.Functionoperator""_fpUser-defined literal for constructing a 20.12 fixed point number.FunctionprintIntPerforms `print int` as part of the fixed point module.Function