CreateScalar
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Creates a scalar constant.
Prototype
- Create a scalar constant of the int64 type.
1EsTensorHolder CreateScalar(int64_t value)
- Create a scalar constant of the int32 type.
1EsTensorHolder CreateScalar(int32_t value)
- Create a scalar constant of the uint64 type.
1EsTensorHolder CreateScalar(uint64_t value)
- Create a scalar constant of the uint32 type.
1EsTensorHolder CreateScalar(uint32_t value)
- Create a scalar constant of the float type.
1EsTensorHolder CreateScalar(float value)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
value |
Input |
Scalar value. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
EsTensorHolder |
Created scalar tensor holder. If the creation fails, an invalid EsTensorHolder is returned. |
Constraints
None
Examples
1 2 | EsGraphBuilder builder("test_graph"); auto s1 = builder.CreateScalar(int64_t(42)); |
Parent topic: EsGraphBuilder