EsCreateConstInt64
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/esb_funcs.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Creates a Const node of the int64 type.
Prototype
1 | EsCTensorHolder *EsCreateConstInt64(EsCGraphBuilder *graph, const int64_t *value, const int64_t *dims, int64_t dim_num) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
graph |
Input |
Pointer to the graph builder. |
value |
Input |
Pointer to the tensor data. |
dims |
Input |
Pointer to the tensor dimension array. |
dim_num |
Input |
Number of dimensions. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
EsCTensorHolder * |
Pointer to the created tensor holder on success, or nullptr on failure. |
Constraints
None
Examples
1 2 3 4 | EsCGraphBuilder *graph = EsCreateGraphBuilder("test_graph"); std::vector<int64_t> data = {1, 2, 3}; std::vector<int64_t> dims = {3}; auto const_tensor = EsCreateConstInt64(graph, data.data(), dims.data(), dims.size()); |
Parent topic: C/C++ APIs