CreateFrom

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File

  • Header file: #include <graph/attr_value.h>
  • Library file: libgraph_base.so

Function Usage

Converts DT-type data types (int64_t, float, and std::string) to T-type data types (INT, FLOAT, and STR). The supported conversion options are as follows:

  • int64_t type to INT
  • float to FLOAT
  • std::string to STR

Prototype

1
2
template<typename T, typename DT>
static T CreateFrom(DT &&val)

Parameters

Parameter

Input/Output

Description

val

Input

Parameter of the DT type.

Returns

Parameter of the T type

Exception Handling

None

Constraints

None