forked from M-Labs/artiq
test/coredevice/primes: keep output list entirely on the host
This commit is contained in:
parent
787a1d34fe
commit
17802d3cff
|
@ -20,6 +20,9 @@ class _Primes(EnvExperiment):
|
||||||
self.setattr_argument("output_list")
|
self.setattr_argument("output_list")
|
||||||
self.setattr_argument("maximum")
|
self.setattr_argument("maximum")
|
||||||
|
|
||||||
|
def _add_output(self, x):
|
||||||
|
self.output_list.append(x)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def run(self):
|
||||||
for x in range(1, self.maximum):
|
for x in range(1, self.maximum):
|
||||||
|
@ -31,7 +34,7 @@ class _Primes(EnvExperiment):
|
||||||
break
|
break
|
||||||
d += 1
|
d += 1
|
||||||
if prime:
|
if prime:
|
||||||
self.output_list.append(x)
|
self._add_output(x)
|
||||||
|
|
||||||
|
|
||||||
class _Misc(EnvExperiment):
|
class _Misc(EnvExperiment):
|
||||||
|
|
Loading…
Reference in New Issue