Compute Library
 20.08
IOFormatInfo Struct Reference

IO formatting information class. More...

#include <Types.h>

Public Types

enum  PrecisionType { Default, Custom, Full }
 Precision type used when printing floating point numbers. More...
 
enum  PrintRegion { ValidRegion, NoPadding, Full }
 Specifies the area to be printed, used by Tensor objects. More...
 

Public Member Functions

 IOFormatInfo (PrintRegion print_region=PrintRegion::ValidRegion, PrecisionType precision_type=PrecisionType::Default, unsigned int precision=10, bool align_columns=true, std::string element_delim=" ", std::string row_delim="\n")
 Construct a set of IO formatting information. More...
 

Data Fields

PrintRegion print_region
 Area to be printed by Tensor objects. More...
 
PrecisionType precision_type
 Floating point precision type. More...
 
unsigned int precision
 Floating point precision. More...
 
std::string element_delim
 Element delimeter. More...
 
std::string row_delim
 Row delimeter. More...
 
bool align_columns
 Align columns. More...
 

Detailed Description

IO formatting information class.

Definition at line 2134 of file Types.h.

Member Enumeration Documentation

◆ PrecisionType

enum PrecisionType
strong

Precision type used when printing floating point numbers.

Enumerator
Default 

Default precision to the one that the current stream has.

Custom 

Custom precision specified by the user using the precision parameter.

Full 

The maximum precision of the floating point representation.

Definition at line 2137 of file Types.h.

2138  {
2139  Default, /**< Default precision to the one that the current stream has */
2140  Custom, /**< Custom precision specified by the user using the precision parameter */
2141  Full /**< The maximum precision of the floating point representation */
2142  };
Default approach using internal heuristics.

◆ PrintRegion

enum PrintRegion
strong

Specifies the area to be printed, used by Tensor objects.

Enumerator
ValidRegion 

Prints the valid region of the Tensor object.

NoPadding 

Prints the Tensor object without the padding.

Full 

Print the tensor object including padding.

Definition at line 2145 of file Types.h.

2146  {
2147  ValidRegion, /**< Prints the valid region of the Tensor object */
2148  NoPadding, /**< Prints the Tensor object without the padding */
2149  Full /**< Print the tensor object including padding */
2150  };

Constructor & Destructor Documentation

◆ IOFormatInfo()

IOFormatInfo ( PrintRegion  print_region = PrintRegion::ValidRegion,
PrecisionType  precision_type = PrecisionType::Default,
unsigned int  precision = 10,
bool  align_columns = true,
std::string  element_delim = " ",
std::string  row_delim = "\n" 
)
inline

Construct a set of IO formatting information.

Parameters
[in]print_regionArea to be printed. Used by Tensor objects. Default: ValidRegion.
[in]precision_typePrecision type for floating point numbers. Default: stream default.
[in]precisionPrecision value for float point numbers. Default: 10.
[in]align_columnsWhether to align columns when printed. Default: true.
[in]element_delimDelimeter between elements. Default: " ".
[in]row_delimDelimenter between rows. Default: "\n".

Definition at line 2161 of file Types.h.

2173  {
2174  }
PrecisionType precision_type
Floating point precision type.
Definition: Types.h:2179
unsigned int precision
Floating point precision.
Definition: Types.h:2181
PrintRegion print_region
Area to be printed by Tensor objects.
Definition: Types.h:2177
std::string row_delim
Row delimeter.
Definition: Types.h:2185
bool align_columns
Align columns.
Definition: Types.h:2187
std::string element_delim
Element delimeter.
Definition: Types.h:2183

Field Documentation

◆ align_columns

bool align_columns

Align columns.

Definition at line 2187 of file Types.h.

◆ element_delim

std::string element_delim

Element delimeter.

Definition at line 2183 of file Types.h.

◆ precision

unsigned int precision

Floating point precision.

Definition at line 2181 of file Types.h.

◆ precision_type

PrecisionType precision_type

Floating point precision type.

Definition at line 2179 of file Types.h.

◆ print_region

PrintRegion print_region

Area to be printed by Tensor objects.

Definition at line 2177 of file Types.h.

◆ row_delim

std::string row_delim

Row delimeter.

Definition at line 2185 of file Types.h.


The documentation for this struct was generated from the following file: