data.memory


template <typename T, auto N>
using memory = [[memory]] T[N] §source
template <typename T, auto N>
using memory_norep = [[memory, non_replicated]] T[N] §source
template <typename T, auto N>
using memory_init = [[memory, initialize]] T[N] §source
template <typename T>
struct ecc §source

Type returned by reads from memory_ecc of type T

Fields

  • bool error §source
    

    True when an ECC error was detected, regardless of whether it was corrected or not.

  • optional<T> data §source
    

    Value read from the memory, valid if there was no ECC error, or an error was corrected.

template <typename T, auto N>
using memory_ecc = [[memory, ecc(make_ecc<T>)]] T[N] §source

Alias for error correction code (ECC) memory of type T and depth of N. Reads from the memory return values of type ecc<T>. Writes to the memory take values of type T.

template <typename T, auto N>
using memory_ecc_norep =
    [[memory, non_replicated, ecc(make_ecc<T>)]] T[N] §source

Alias for non-replicated, ECC memory of type T and depth of N. Reads from the memory return values of type ecc<T>. Writes to the memory take values of type T.

template <typename T, auto N>
using memory_ecc_strict =
    [[memory, ecc(make_optional_from_ecc_error<T>)]] T[N] §source

Alias for ECC memory of type T and depth of N. Reads from the memory return values of type optional<T> that is valid if no ECC error, even a correctable one, was detected. Writes to the memory take values of type T.

template <typename T, auto N>
using memory_ecc_relaxed =
    [[memory, ecc(make_optional_from_ecc_valid<T>)]] T[N] §source

Alias for ECC memory of type T and depth of N. Reads from the memory return values of type optional<T> that is valid if there was no ECC error, or an error was corrected. Writes to the memory take values of type T.