MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / set_format

Method set_format

imperative/python/src/tensor.h:63–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62 inline Format format() { return *data().format(); }
63 inline void set_format(std::string format) {
64 if (!format.empty()) {
65 m_data = imperative::apply(SetFormat(format), m_data)[0];
66 }
67 }
68 inline void as_format(std::string format) {
69 if (!format.empty()) {
70 m_data = imperative::apply(AsFormat(format), m_data)[0];

Callers 1

_set_formatMethod · 0.45

Calls 3

SetFormatClass · 0.85
applyFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected