MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
ImmData.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Contributors to the Media eXchange Layer project.
2//
3// SPDX-License-Identifier: Apache-2.0
4
5#pragma once
6
7#include <cstdint>
8
10{
11
15 {
16 public:
17 struct Unpacked //**< Unpacked representation of immediate data. */
18 {
19 std::uint16_t ringBufferSlot;
20 std::uint16_t sliceIndex;
21 };
22
23 public:
28 ImmDataGrain(std::uint32_t data) noexcept;
29
35 ImmDataGrain(std::uint64_t index, std::uint16_t sliceIndex) noexcept;
36
41 [[nodiscard]]
42 Unpacked unpack() const noexcept;
43
48 [[nodiscard]]
49 std::uint32_t data() const noexcept;
50
51 private:
52 std::uint32_t _inner;
53 };
54
55}
Unpacked unpack() const noexcept
Unpack the immediate data into ring buffer index and slice index.
Definition ImmData.cpp:22
ImmDataGrain(std::uint32_t data) noexcept
Create immediate data from packed data.
Definition ImmData.cpp:11
std::uint32_t data() const noexcept
Get the packed immediate data.
Definition ImmData.cpp:27
uint64_t index