CreateVector

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

Function Usage

Creates a vector constant.

Prototype

  • Create a vector constant of the int64 type.
    1
    EsTensorHolder CreateVector(const std::vector<int64_t> &value)
    
  • Create a vector constant of the int32 type.
    1
    EsTensorHolder CreateVector(const std::vector<int32_t> &value)
    
  • Create a vector constant of the uint64 type.
    1
    EsTensorHolder CreateVector(const std::vector<uint64_t> &value)
    
  • Create a vector constant of the uint32 type.
    1
    EsTensorHolder CreateVector(const std::vector<uint32_t> &value)
    
  • Create a vector constant of the float type.
    1
    EsTensorHolder CreateVector(const std::vector<float> &value)
    

Parameters

Parameter

Input/Output

Description

value

Input

Data vector of the vector constant.

Returns

Parameter

Type

Description

-

EsTensorHolder

Created vector tensor holder. If the creation fails, an invalid EsTensorHolder is returned.

Constraints

None

Examples

1
2
3
EsGraphBuilder builder("test_graph");
std::vector<int64_t> vec64 = {1, 2, 3};
auto v1 = builder.CreateVector(vec64);