Compute Library
 19.11
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 2108 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 2111 of file Types.h.

2112  {
2113  Default, /**< Default precision to the one that the current stream has */
2114  Custom, /**< Custom precision specified by the user using the precision parameter */
2115  Full /**< The maximum precision of the floating point representation */
2116  };
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 2119 of file Types.h.

2120  {
2121  ValidRegion, /**< Prints the valid region of the Tensor object */
2122  NoPadding, /**< Prints the Tensor object without the padding */
2123  Full /**< Print the tensor object including padding */
2124  };

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 2135 of file Types.h.

2147  {
2148  }
PrecisionType precision_type
Floating point precision type.
Definition: Types.h:2153
unsigned int precision
Floating point precision.
Definition: Types.h:2155
PrintRegion print_region
Area to be printed by Tensor objects.
Definition: Types.h:2151
std::string row_delim
Row delimeter.
Definition: Types.h:2159
bool align_columns
Align columns.
Definition: Types.h:2161
std::string element_delim
Element delimeter.
Definition: Types.h:2157

Field Documentation

◆ align_columns

bool align_columns

Align columns.

Definition at line 2161 of file Types.h.

◆ element_delim

std::string element_delim

Element delimeter.

Definition at line 2157 of file Types.h.

◆ precision

unsigned int precision

Floating point precision.

Definition at line 2155 of file Types.h.

◆ precision_type

PrecisionType precision_type

Floating point precision type.

Definition at line 2153 of file Types.h.

◆ print_region

PrintRegion print_region

Area to be printed by Tensor objects.

Definition at line 2151 of file Types.h.

◆ row_delim

std::string row_delim

Row delimeter.

Definition at line 2159 of file Types.h.


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