forked from M-Labs/nac3
1
0
Fork 0

core/irrt: add List

Needed for implementing np_array()
This commit is contained in:
lyken 2024-08-20 14:51:40 +08:00
parent 0bb2b02daa
commit 4dcbaed8ee
No known key found for this signature in database
GPG Key ID: 3BD5FC6AC8325DD8
2 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#include <irrt/exception.hpp>
#include <irrt/int_types.hpp>
#include <irrt/list.hpp>
#include <irrt/math_util.hpp>
#include <irrt/ndarray/basic.hpp>
#include <irrt/ndarray/def.hpp>

View File

@ -0,0 +1,19 @@
#pragma once
#include <irrt/int_types.hpp>
#include <irrt/slice.hpp>
namespace
{
/**
* @brief A list in NAC3.
*
* The `items` field is opaque. You must rely on external contexts to
* know how to interpret it.
*/
template <typename SizeT> struct List
{
uint8_t *items;
SizeT len;
};
} // namespace