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

Method Format

src/custom/impl/tensor.cpp:396–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396Format::Format(const void* impl) : m_impl(nullptr, impl_deleter<FormatImpl>) {
397 mgb_assert(impl != nullptr, "invalid ptr");
398 mgb_assert(
399 FormatImplConstRef(impl).is_default(),
400 "only default format is supported now");
401
402 m_impl.reset(new FormatImpl(FormatImplConstRef(impl)));
403}
404
405Format::Format(const std::string& format) : m_impl(nullptr, impl_deleter<FormatImpl>) {
406 mgb_assert(format == "default", "only default format is supported now");

Callers

nothing calls this directly

Calls 2

is_defaultMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected