Skip to content
Start free evaluation

pdcomm::GemInt128

Struct

Signed 128-bit integer stored as two's complement: high * 2^64 + low.

struct GemInt128

Declared in: #include <pdcomm_gem.hpp>

Used for remote command parameter bounds without requiring a compiler __int128.

Members

fromSigned

Method

Converts a signed 64-bit value with sign extension.

static constexpr GemInt128 fromSigned(int64_t value) noexcept

Declared in: #include <pdcomm_gem.hpp>

Parameters

NameDescription
valueValue to convert.

Returns

The same value as a GemInt128.

fromUnsigned

Method

Converts an unsigned 64-bit value.

static constexpr GemInt128 fromUnsigned(uint64_t value) noexcept

Declared in: #include <pdcomm_gem.hpp>

Parameters

NameDescription
valueValue to convert.

Returns

The same value as a GemInt128.

high

Field

High 64 bits, including the sign.

int64_t high

Declared in: #include <pdcomm_gem.hpp>

low

Field

Low 64 bits.

uint64_t low

Declared in: #include <pdcomm_gem.hpp>

native

Method

Converts to the C representation.

constexpr PdcommGemInt128 native() const noexcept

Declared in: #include <pdcomm_gem.hpp>

Returns

A PdcommGemInt128 with the same bits.