ZIO
Python and C++ interface to ZeroMQ and Zyre
Functions | Variables
zio::tens Namespace Reference

Functions

const char * type_name (const std::type_info &t)
 
template<typename Type >
const char * dtype ()
 
void append (Message &msg, message_t &&data, const std::vector< size_t > &shape, size_t word_size, const char *tn)
 
template<typename ElementType >
void append (Message &msg, const ElementType *data, const std::vector< size_t > &shape)
 
const zio::message_tat (const Message &msg, size_t index)
 

Variables

const char * form = "TENS"
 

Function Documentation

◆ append() [1/2]

void zio::tens::append ( zio::Message msg,
zio::message_t &&  data,
const std::vector< size_t > &  shape,
size_t  word_size,
const char *  tn 
)

Generic version of append.

Definition at line 34 of file tens.cpp.

◆ append() [2/2]

template<typename ElementType >
void zio::tens::append ( Message msg,
const ElementType *  data,
const std::vector< size_t > &  shape 
)

Append one array data of given shape to message.

  • shape :: number of elements in each dimension.

This performs a copy of data.

Definition at line 34 of file tens.hpp.

◆ at()

const zio::message_t & zio::tens::at ( const Message msg,
size_t  index 
)

Return the tensor at the given index.

Index is into the label object TENS JSON array which may not be the message part index.

An empty message is returned on error.

Return the tensor data at payload index in FORM message.

This returns a pointer into the message data.

Index over/underflow or type mismatch returns NULL.

Definition at line 58 of file tens.hpp.

◆ dtype()

template<typename Type >
const char* zio::tens::dtype ( )

Definition at line 20 of file tens.hpp.

◆ type_name()

const char * zio::tens::type_name ( const std::type_info &  t)

Definition at line 6 of file tens.cpp.

Variable Documentation

◆ form

const char* zio::tens::form = "TENS"

Definition at line 15 of file tens.hpp.