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

Function write_magic

lite/example/cpp_example/npy.h:77–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75typedef unsigned long int ndarray_len_t;
76
77inline void write_magic(
78 std::ostream& ostream, unsigned char v_major = 1, unsigned char v_minor = 0) {
79 ostream.write(magic_string, magic_string_length);
80 ostream.put(v_major);
81 ostream.put(v_minor);
82}
83
84inline void read_magic(
85 std::istream& istream, unsigned char& v_major, unsigned char& v_minor) {

Callers 1

write_headerFunction · 0.70

Calls 2

writeMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected