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

Class Attrs

tensorflow/core/framework/function_test.cc:34–48  ·  view source on GitHub ↗

A helper class to make AttrSlice from initializer lists

Source from the content-addressed store, hash-verified

32
33// A helper class to make AttrSlice from initializer lists
34class Attrs {
35 public:
36 Attrs(const std::initializer_list< // NOLINT(runtime/explicit)
37 std::pair<string, FunctionDefHelper::AttrValueWrapper>>
38 attrs) {
39 for (const auto& aval : attrs) {
40 map_.insert({aval.first, aval.second.proto});
41 }
42 }
43
44 operator AttrSlice() { return AttrSlice(&map_); } // NOLINT(runtime/explicit)
45
46 private:
47 AttrValueMap map_;
48};
49
50typedef FunctionDefHelper FDH;
51

Callers 15

TESTFunction · 0.70
TESTFunction · 0.50
TESTFunction · 0.50
TEST_FFunction · 0.50
MakeResizeNodeDefFunction · 0.50

Calls 1

AttrSliceClass · 0.85

Tested by 15

TESTFunction · 0.56
TESTFunction · 0.40
TESTFunction · 0.40
TEST_FFunction · 0.40
MakeResizeNodeDefFunction · 0.40