|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
#include "lbann/utils/exception.hpp"#include <google/protobuf/any.pb.h>#include <google/protobuf/message.h>#include <google/protobuf/reflection.h>#include <google/protobuf/repeated_field.h>#include <memory>#include <set>#include <string>#include <type_traits>#include <unordered_set>#include <vector>Go to the source code of this file.
Namespaces | |
| lbann | |
| lbann::protobuf | |
| lbann::protobuf::text | |
Typedefs | |
Typedefs for working with Protobuf fixed-width types. | |
| using | lbann::protobuf::int8 = google::protobuf::int8 |
| using | lbann::protobuf::int16 = google::protobuf::int16 |
| using | lbann::protobuf::int32 = google::protobuf::int32 |
| using | lbann::protobuf::int64 = google::protobuf::int64 |
| using | lbann::protobuf::uint8 = google::protobuf::uint8 |
| using | lbann::protobuf::uint16 = google::protobuf::uint16 |
| using | lbann::protobuf::uint32 = google::protobuf::uint32 |
| using | lbann::protobuf::uint64 = google::protobuf::uint64 |
Functions | |
Message queries | |
| bool | lbann::protobuf::has_oneof (google::protobuf::Message const &msg, std::string const &oneof_name) |
| Test whether the message has a oneof field with the given name. More... | |
| google::protobuf::Message const & | lbann::protobuf::get_oneof_message (google::protobuf::Message const &msg, std::string const &oneof_name) |
| Get a message in a oneof from the given message. More... | |
| std::string | lbann::protobuf::which_oneof (google::protobuf::Message const &msg, std::string const &oneof_name) |
| Get the name of the set field in the named oneof. More... | |
| std::string | lbann::protobuf::message_type (google::protobuf::Message const &msg) |
| Get the name of the message type as a string. More... | |
| std::string | lbann::protobuf::message_type (google::protobuf::Any const &any) |
| Get the name of the underlying message type as a string. More... | |
Complex extraction methods | |
| template<typename T > | |
| auto | lbann::protobuf::as_vector (google::protobuf::Message const &msg, std::string const &field_name) -> std::vector< T > |
| Extract the values from the named field as a vector. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_vector (google::protobuf::RepeatedField< T > const &) -> std::vector< T > |
| Convert the repeated field to an STL vector. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_vector (google::protobuf::RepeatedPtrField< T > const &) -> std::vector< T > |
| Convert the repeated field to an STL vector. More... | |
| template<typename OutT , typename InT > | |
| auto | lbann::protobuf::to_vector (google::protobuf::RepeatedField< InT > const &rf) -> std::vector< OutT > |
| Convert the repeated field to an STL vector of given type. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_set (google::protobuf::Message const &msg, std::string const &field_name) -> std::set< T > |
| Extract the values from the named field as a set. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_set (google::protobuf::RepeatedField< T > const &) -> std::set< T > |
| Convert the repeated field to an STL set. More... | |
| auto | lbann::protobuf::as_set (google::protobuf::RepeatedPtrField< std::string > const &) -> std::set< std::string > |
| Convert the repeated field to an STL set. More... | |
| template<typename OutT , typename InT > | |
| auto | lbann::protobuf::to_set (google::protobuf::RepeatedField< InT > const &) -> std::set< OutT > |
| Convert the repeated field to an STL set of given type. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_unordered_set (google::protobuf::Message const &msg, std::string const &field_name) -> std::unordered_set< T > |
| Extract the values from the named field as an unordered_set. More... | |
| template<typename T > | |
| auto | lbann::protobuf::as_unordered_set (google::protobuf::RepeatedField< T > const &) -> std::unordered_set< T > |
| Convert the repeated field to an STL unordered_set. More... | |
| auto | lbann::protobuf::as_unordered_set (google::protobuf::RepeatedPtrField< std::string > const &) -> std::unordered_set< std::string > |
| Convert the repeated field to an STL unordered_set. More... | |
| template<typename OutT , typename InT > | |
| auto | lbann::protobuf::to_unordered_set (google::protobuf::RepeatedField< InT > const &) -> std::unordered_set< OutT > |
| Convert the repeated field to an STL unordered_set of given type. More... | |
Message I/O | |
| void | lbann::protobuf::fill (std::istream &is, google::protobuf::Message &msg) |
| Fill the protobuf message from a binary stream. More... | |
| void | lbann::protobuf::fill (std::string const &pbuf_str, google::protobuf::Message &msg) |
| Fill the protobuf message from a string of bytes. More... | |
| void | lbann::protobuf::load (std::string const &pbuf_filename, google::protobuf::Message &msg) |
| Fill the protobuf message from a binary file. More... | |
| void | lbann::protobuf::serialize (std::ostream &os, google::protobuf::Message const &msg) |
| Serialize the protobuf message to a stream. More... | |
| std::string | lbann::protobuf::serialize (google::protobuf::Message const &msg) |
| Serialize the protobuf message to a string. More... | |
| void | lbann::protobuf::serialize (std::string const &pbuf_filename, google::protobuf::Message const &msg) |
| Serialize the protobuf message to a file. More... | |
Writing protobufs | |
| template<typename T , typename ContainerT > | |
| void | lbann::protobuf::assign_to_repeated (google::protobuf::RepeatedField< T > &field, ContainerT const &values) |
| Assign a range of values to a repeated protobuf field. More... | |
| template<typename ContainerT > | |
| std::string | lbann::protobuf::to_space_sep_string (ContainerT const &values) |
| Concatenate a container of strings into a single string. Elements are space separated. More... | |
Prototext I/O | |
| void | lbann::protobuf::text::fill (std::istream &is, google::protobuf::Message &msg) |
| Fill the protobuf message from prototext in a stream. More... | |
| void | lbann::protobuf::text::fill (std::string const &str, google::protobuf::Message &msg) |
| Fill the protobuf message from prototext in a string. More... | |
| void | lbann::protobuf::text::load (std::string const &ptext_filename, google::protobuf::Message &msg) |
| Fill the protobuf message from prototext in a file. More... | |
| void | lbann::protobuf::text::write (std::ostream &os, google::protobuf::Message const &msg) |
| Write the protobuf message in prototext in a stream. More... | |
| std::string | lbann::protobuf::text::write (google::protobuf::Message const &msg) |
| Write the protobuf message in prototext into a string. More... | |
| void | lbann::protobuf::text::write (std::string const &ptext_filename, google::protobuf::Message const &msg) |
| Write the protobuf message in prototext to a file. More... | |