forked from M-Labs/artiq
language: scan functions are not supported on core device.
Closes #1009.
This commit is contained in:
parent
5667cef667
commit
02f6727fa2
|
@ -42,12 +42,10 @@ class NoScan(ScanObject):
|
||||||
self.value = value
|
self.value = value
|
||||||
self.repetitions = repetitions
|
self.repetitions = repetitions
|
||||||
|
|
||||||
@portable
|
|
||||||
def _gen(self):
|
def _gen(self):
|
||||||
for i in range(self.repetitions):
|
for i in range(self.repetitions):
|
||||||
yield self.value
|
yield self.value
|
||||||
|
|
||||||
@portable
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return self._gen()
|
return self._gen()
|
||||||
|
|
||||||
|
@ -81,7 +79,6 @@ class RangeScan(ScanObject):
|
||||||
rng = random.Random(seed)
|
rng = random.Random(seed)
|
||||||
random.shuffle(self.sequence, rng.random)
|
random.shuffle(self.sequence, rng.random)
|
||||||
|
|
||||||
@portable
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.sequence)
|
return iter(self.sequence)
|
||||||
|
|
||||||
|
@ -101,7 +98,6 @@ class ExplicitScan(ScanObject):
|
||||||
def __init__(self, sequence):
|
def __init__(self, sequence):
|
||||||
self.sequence = sequence
|
self.sequence = sequence
|
||||||
|
|
||||||
@portable
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.sequence)
|
return iter(self.sequence)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue