VertexTemplates

#include <poputil/VertexTemplates.hpp>

Generate a string describing a vertex type.

template<>
struct VertexTemplateToString<poplar::StringRef>

Public Static Functions

static inline std::string to_string(const poplar::StringRef &ref)
namespace poputil

General utility functions for building graphs.

Functions

inline std::string templateVertexParams(bool first)
template<typename ...Args>
inline std::string templateVertexParams(bool first, const std::string &val, Args&&... args)
template<typename ...Args>
inline std::string templateVertexParams(bool first, const char *val, Args&&... args)
template<typename ...Args>
inline std::string templateVertexParams(bool first, const poplar::Type &type, Args&&... args)
template<typename ...Args>
inline std::string templateVertexParams(bool first, bool b, Args&&... args)
template<typename T, typename ...Args>
inline std::string templateVertexParams(bool first, const T &val, Args&&... args)
template<typename ...Args>
inline std::string templateVertex(const std::string &name, Args&&... args)

Generate a string representation of a Vertex type for use by poplar::Graph::addVertex().

Parameters
  • name – The name of the vertex.

  • args – The types of the arguments to the vertex.

Returns

A string representation of the vertex type.

template<typename T>
struct VertexTemplateToString

Public Static Functions

static inline std::string to_string(const T &x)
template<> StringRef >

Public Static Functions

static inline std::string to_string(const poplar::StringRef &ref)