MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PopulateWithValue

Method PopulateWithValue

tensorflow/compiler/xla/literal.h:1044–1051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1042
1043template <typename NativeT>
1044void MutableLiteralBase::PopulateWithValue(NativeT value) {
1045 CHECK(shape().IsArray());
1046 CHECK_EQ(shape().element_type(),
1047 primitive_util::NativeToPrimitiveType<NativeT>());
1048 for (NativeT& element : data<NativeT>()) {
1049 element = value;
1050 }
1051}
1052
1053template <typename NativeT>
1054Literal LiteralBase::Replicate(int64 times) const {

Callers 8

RunMethod · 0.80
ReadMethod · 0.80
ConstantR1Function · 0.80
XLA_TEST_FFunction · 0.80
RunTest1DMethod · 0.80
XLA_TEST_PFunction · 0.80

Calls 3

shapeFunction · 0.50
IsArrayMethod · 0.45
element_typeMethod · 0.45

Tested by 3

XLA_TEST_FFunction · 0.64
RunTest1DMethod · 0.64
XLA_TEST_PFunction · 0.64