MCPcopy Create free account
hub / github.com/MegEngine/MegCC / FastIter

Method FastIter

compiler/test/kernel/common/src/rng.cpp:45–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43class FastIter {
44public:
45 FastIter(const TensorND& tensor, bool is_contig) : m_contig(is_contig) {
46 if (is_contig) {
47 m_ptr = reinterpret_cast<ctype*>(tensor.raw_ptr());
48 } else {
49 m_naive_iter = tensor_iter_valonly<ctype>(tensor).begin();
50 }
51 }
52
53 ctype& operator*() {
54 if (m_contig) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected