|
|
@ -16,7 +16,7 @@ import math |
|
|
|
|
|
|
|
|
|
|
|
import numpy as np |
|
|
|
import numpy as np |
|
|
|
|
|
|
|
|
|
|
|
from . import numba, cuda, sim, cdiv |
|
|
|
from . import numba, cuda, sim, cdiv, eng |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TMAX = np.float32(2 ** 127) |
|
|
|
TMAX = np.float32(2 ** 127) |
|
|
@ -103,7 +103,7 @@ class WaveSim(sim.SimOps): |
|
|
|
def __repr__(self): |
|
|
|
def __repr__(self): |
|
|
|
dev = 'GPU' if hasattr(self.c, 'copy_to_host') else 'CPU' |
|
|
|
dev = 'GPU' if hasattr(self.c, 'copy_to_host') else 'CPU' |
|
|
|
return f'{{name: "{self.circuit.name}", device: "{dev}", sims: {self.sims}, ops: {len(self.ops)}, ' + \ |
|
|
|
return f'{{name: "{self.circuit.name}", device: "{dev}", sims: {self.sims}, ops: {len(self.ops)}, ' + \ |
|
|
|
f'levels: {len(self.level_starts)}, nbytes: {self.nbytes}}}' |
|
|
|
f'levels: {len(self.level_starts)}, nbytes: {eng(self.nbytes)}}}' |
|
|
|
|
|
|
|
|
|
|
|
def s_to_c(self): |
|
|
|
def s_to_c(self): |
|
|
|
"""Transfers values of sequential elements and primary inputs to the combinational portion. |
|
|
|
"""Transfers values of sequential elements and primary inputs to the combinational portion. |
|
|
|