Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
tensor_bridge.hpp File Reference

Zero-copy tensor bridge: maps Parquet column data directly into ML-framework-compatible tensor views (ONNX Runtime, PyTorch, etc.) without copying. More...

#include "signet/types.hpp"
#include "signet/error.hpp"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <stdexcept>
#include <cstdint>
#include <cstring>
#include <limits>
#include <memory>
#include <new>
#include <numeric>
#include <string>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Classes

class  signet::forge::detail::AlignedAllocator< T, Alignment >
 
struct  signet::forge::detail::AlignedAllocator< T, Alignment >::rebind< U >
 
struct  signet::forge::TensorShape
 Describes the shape of a tensor as a vector of dimension sizes. More...
 
class  signet::forge::TensorView
 A lightweight, non-owning view into a contiguous block of typed memory, interpreted as a multi-dimensional tensor. More...
 
class  signet::forge::OwnedTensor
 An owning tensor that manages its own memory via a std::vector<uint8_t> buffer. More...
 
class  signet::forge::ColumnToTensor
 Provides static methods to convert Parquet column data into tensor form. More...
 
class  signet::forge::BatchTensorBuilder
 Builds a single contiguous 2D tensor from multiple column tensors, suitable for passing to an ML inference engine (ONNX Runtime, etc.). More...
 

Namespaces

namespace  signet
 
namespace  signet::forge
 
namespace  signet::forge::detail
 Internal implementation details for dictionary encoding.
 

Enumerations

enum class  signet::forge::TensorDataType : int32_t {
  signet::forge::FLOAT32 = 0 , signet::forge::FLOAT64 = 1 , signet::forge::INT32 = 2 , signet::forge::INT64 = 3 ,
  signet::forge::INT8 = 4 , signet::forge::UINT8 = 5 , signet::forge::INT16 = 6 , signet::forge::FLOAT16 = 7 ,
  signet::forge::BOOL = 8
}
 Element data type for tensor storage, mapping to ONNX/PyTorch/TF type enums. More...
 

Functions

template<typename T >
bool signet::forge::detail::is_pointer_aligned (const void *ptr) noexcept
 
template<typename T >
T * signet::forge::detail::aligned_ptr (void *ptr) noexcept
 
template<typename T >
const T * signet::forge::detail::aligned_ptr (const void *ptr) noexcept
 
template<typename T >
T * signet::forge::detail::aligned_ptr_at (void *base, std::size_t offset) noexcept
 
template<typename T >
const T * signet::forge::detail::aligned_ptr_at (const void *base, std::size_t offset) noexcept
 
constexpr size_t signet::forge::tensor_element_size (TensorDataType dtype) noexcept
 Returns the byte size of a single element of the given tensor data type.
 
const char * signet::forge::tensor_dtype_name (TensorDataType dtype) noexcept
 Returns a human-readable name for a TensorDataType.
 

Detailed Description

Zero-copy tensor bridge: maps Parquet column data directly into ML-framework-compatible tensor views (ONNX Runtime, PyTorch, etc.) without copying.

Provides TensorView, OwnedTensor, ColumnToTensor, and BatchTensorBuilder.

Definition in file tensor_bridge.hpp.