14#include "adc/adc_config.h"
26 const std::vector <std::string>
tags;
27 version(
const std::string n, std::vector <std::string> t) : name(n), tags(t) {}
32#define ADC_SUPPORT_GPU_FLOATS 0
36#define ADC_SUPPORT_EXTENDED_FLOATS 0
40#define ADC_SUPPORT_QUAD_FLOATS 0
46#define ADC_BOOST_JSON_PUBLIC 0
132 std::complex<double>,
133 std::array<int64_t, 2>,
135 std::shared_ptr<bool[]>,
136 std::shared_ptr<char[]>,
137 std::shared_ptr<char16_t[]>,
138 std::shared_ptr<char32_t[]>,
139 std::shared_ptr<int8_t[]>,
140 std::shared_ptr<int16_t[]>,
141 std::shared_ptr<int32_t[]>,
142 std::shared_ptr<int64_t[]>,
143 std::shared_ptr<uint8_t[]>,
144 std::shared_ptr<uint16_t[]>,
145 std::shared_ptr<uint32_t[]>,
146 std::shared_ptr<uint64_t[]>,
147 std::shared_ptr<float[]>,
148 std::shared_ptr<double[]>,
149 std::shared_ptr<std::complex<float>[]>,
150 std::shared_ptr<std::complex<double>[]>,
151 std::shared_ptr<std::string[]>
170ADC_VISIBLE
const std::string
to_string(
float);
173ADC_VISIBLE
const std::string
to_string(
double);
197 std::string
operator()(
const bool x)
const {
return std::string(x ?
"true":
"false"); }
198 std::string
operator()(
char x)
const {
return std::string(1, x); }
199 std::string
operator()(
char16_t x)
const {
return std::to_string((uint16_t) x); }
200 std::string
operator()(
char32_t x)
const {
return std::to_string((uint32_t) x); }
201 std::string
operator()(int8_t x)
const {
return std::to_string(x); }
202 std::string
operator()(int16_t x)
const {
return std::to_string(x); }
203 std::string
operator()(int32_t x)
const {
return std::to_string(x); }
204 std::string
operator()(int64_t x)
const {
return std::to_string(x); }
205 std::string
operator()(uint8_t x)
const {
return std::to_string(x); }
206 std::string
operator()(uint16_t x)
const {
return std::to_string(x); }
207 std::string
operator()(uint32_t x)
const {
return std::to_string(x); }
208 std::string
operator()(uint64_t x)
const {
return std::to_string(x); }
213 std::string
operator()(std::array<int64_t, 2> x)
const {
return std::to_string(x[0]) +
"," + std::to_string(x[1]); }
214 std::string
operator()(std::string x)
const {
return std::string(x); }
return string for printing from variant v.
std::string operator()(char32_t x) const
std::string operator()(int64_t x) const
std::string operator()(std::shared_ptr< int16_t[]> x) const
std::string operator()(std::complex< double > x) const
std::string operator()(std::shared_ptr< int64_t[]> x) const
std::string operator()(std::array< int64_t, 2 > x) const
std::string operator()(int8_t x) const
std::string operator()(uint32_t x) const
std::string operator()(int32_t x) const
std::string operator()(uint8_t x) const
std::string operator()(std::shared_ptr< std::complex< double >[]> x) const
std::string operator()(std::shared_ptr< std::string[]> x) const
std::string operator()(uint64_t x) const
std::string operator()(std::shared_ptr< std::complex< float >[]> x) const
std::string operator()(char x) const
std::string operator()(float x) const
std::string operator()(std::shared_ptr< int32_t[]> x) const
std::string operator()(int16_t x) const
std::string operator()(char16_t x) const
std::string operator()(std::shared_ptr< uint64_t[]> x) const
std::string operator()(std::shared_ptr< uint32_t[]> x) const
std::string operator()(uint16_t x) const
std::string operator()(std::shared_ptr< float[]> x) const
std::string operator()(std::shared_ptr< uint16_t[]> x) const
std::string operator()(std::shared_ptr< char[]> x) const
std::string operator()(double x) const
std::string operator()(std::shared_ptr< int8_t[]> x) const
std::string operator()(std::shared_ptr< char32_t[]> x) const
std::string operator()(const bool x) const
std::string operator()(std::string x) const
std::string operator()(std::shared_ptr< bool[]> x) const
std::string operator()(std::shared_ptr< char16_t[]> x) const
std::string operator()(std::shared_ptr< double[]> x) const
std::string operator()(std::complex< float > x) const
std::string operator()(std::shared_ptr< uint8_t[]> x) const
int test_enum_strings()
return non-zero if to_string and enum scalar_type are inconsisent.
key_type
when expanding scalar_type, always update enum.ipp to match.
scalar_type scalar_type_from_name(const std::string &name)
get the enum representation of a scalar_type string
version enum_version("1.0.0", {"none"})
the version number of enum scalar_type and object_type
std::variant< bool, char, char16_t, char32_t, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float, double, std::complex< float >, std::complex< double >, std::array< int64_t, 2 >, std::string, std::shared_ptr< bool[]>, std::shared_ptr< char[]>, std::shared_ptr< char16_t[]>, std::shared_ptr< char32_t[]>, std::shared_ptr< int8_t[]>, std::shared_ptr< int16_t[]>, std::shared_ptr< int32_t[]>, std::shared_ptr< int64_t[]>, std::shared_ptr< uint8_t[]>, std::shared_ptr< uint16_t[]>, std::shared_ptr< uint32_t[]>, std::shared_ptr< uint64_t[]>, std::shared_ptr< float[]>, std::shared_ptr< double[]>, std::shared_ptr< std::complex< float >[]>, std::shared_ptr< std::complex< double >[]>, std::shared_ptr< std::string[]> > variant
variant for querying builder data.
object_type
classification of json-adjacent structure elements. This is not currently in use and may be retired s...
const std::string to_string(float f)
get string of float using to_chars.
scalar_type
field types for scientific data encode/decode with json.
@ co_map
string keyed map of arbitrary values
@ co_list
ordered list of arbitrary values
@ co_array
0-indexed continguous array of type-identical values
@ cp_xml_str
c null-terminated string that contains valid xml
@ cp_epoch
time(NULL) seconds since the epoch (UNIX) as int64_t
@ cp_f16_e8m7
16 bit bfloat (7 mantissa, 8 exponent); requires ADC_SUPPORT_GPU_FLOATS support
@ cp_path
c null-terminated string which names a file-system path
@ cp_json_str
c null-terminated string that contains valid json
@ cp_timespec
(second, nanosecond) as int64_t, int64_t pair from clock_gettime
@ cp_timeval
gettimeofday struct timeval (second, microsecond) as int64_t pair
@ cp_c_f64
complex<double>
@ cp_bool
bool (true/false,1/0)
@ cp_f128
128 bit float; requires ADC_SUPPORT_QUAD_FLOATS support
@ cp_json
json value (object, list, etc)
@ cp_c_f80
complex<extended>; requires ADC_SUPPORT_EXTENDED_FLOATS support
@ cp_number_str
c null-terminated string containing an exact decimal representation of arbitrary precision
@ cp_f80
80 bit float; requires ADC_SUPPORT_EXTENDED_FLOATS support
@ cp_yaml_str
c null-terminated string that contains valid yaml
@ cp_f16_e5m10
16 bit float (10 mantissa, 5 exponent); requires ADC_SUPPORT_GPU_FLOATS support
@ cp_c_f128
complex<quad>; requires ADC_SUPPORT_QUAD_FLOATS support
@ cp_cstr
c null-terminated string
@ cp_f8_e5m2
8 bit float (2 mantissa, 5 exponent); requires ADC_SUPPORT_GPU_FLOATS support
@ cp_f8_e4m3
8 bit float (3 mantissa, 4 exponent); requires ADC_SUPPORT_GPU_FLOATS support
std::string container
name of the container variety given to see builder::add_array
scalar_type st
scalar type of the data as published,
size_t count
number of elements in vp.
key_type kt
kind of data associated with the name queried
const void * vp
address of data to be cast according to st for use with c/fortran
A version with tags list.
version(const std::string n, std::vector< std::string > t)
const std::vector< std::string > tags