MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / Buffer

Class Buffer

flow-python/examples/logical_test/buffer.py:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7@res_register()
8class Buffer:
9 def __init__(self, name, args):
10 self.name = name
11 self.n = args['n']
12 self.i = 0
13
14 def get(self):
15 self.i += 1
16 return self.i % self.n

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected