Continuum C++ API
Unified runtime for token + tensor execution
Loading...
Searching...
No Matches
value.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <torch/torch.h>
4
5
#include <string>
6
#include <variant>
7
#include <vector>
8
9
namespace
continuum
{
10
11
struct
TensorValue
{
12
torch::Tensor
tensor
;
13
std::string
backend_type
=
"libtorch"
;
14
};
15
16
struct
MlxTensorValue
{
17
std::vector<std::int64_t>
shape
;
18
std::vector<float>
data
;
19
std::string
backend_type
=
"mlx"
;
20
};
21
22
struct
TokensValue
{
23
std::vector<int>
ids
;
24
};
25
26
struct
SchemaValue
{
27
std::string
json
;
28
};
29
30
using
Value
= std::variant<TensorValue, MlxTensorValue, TokensValue, SchemaValue, std::string, double, int64_t>;
31
32
}
// namespace continuum
continuum
Definition
anthropic.hpp:4
continuum::Value
std::variant< TensorValue, MlxTensorValue, TokensValue, SchemaValue, std::string, double, int64_t > Value
Definition
value.hpp:30
continuum::MlxTensorValue
Definition
value.hpp:16
continuum::MlxTensorValue::shape
std::vector< std::int64_t > shape
Definition
value.hpp:17
continuum::MlxTensorValue::data
std::vector< float > data
Definition
value.hpp:18
continuum::MlxTensorValue::backend_type
std::string backend_type
Definition
value.hpp:19
continuum::SchemaValue
Definition
value.hpp:26
continuum::SchemaValue::json
std::string json
Definition
value.hpp:27
continuum::TensorValue
Definition
value.hpp:11
continuum::TensorValue::backend_type
std::string backend_type
Definition
value.hpp:13
continuum::TensorValue::tensor
torch::Tensor tensor
Definition
value.hpp:12
continuum::TokensValue
Definition
value.hpp:22
continuum::TokensValue::ids
std::vector< int > ids
Definition
value.hpp:23
include
continuum
ir
value.hpp
Generated by
1.9.8