def setup(self, linsys, dim, qoi): if dim > 1000: # Operations on the posterior for large matrices can be very memory intensive. raise NotImplementedError() self.linsys = get_linear_system(name=linsys, dim=dim) x, A, Ainv, _ = problinsolve(A=self.linsys.A, b=self.linsys.b) self.qoi = get_quantity_of_interest(qoi, x, A, Ainv)
def setup(self, output): # pylint: disable=attribute-defined-outside-init # pylint: disable=unused-argument, invalid-name # Sparse system self.A, self.b = load_poisson_linear_system() # Solve linear system self.xhat, self.Ahat, self.Ainvhat, _ = problinsolve(A=self.A, b=self.b) # Benchmark parameters self.n_samples = 10
def setup(self, output): # pylint: disable=invalid-name # Sparse system self.A, self.b = load_poisson_linear_system() # Solve linear system self.xhat, self.Ahat, self.Ainvhat, _ = problinsolve(A=self.A, b=self.b) # Benchmark parameters self.n_samples = 10
def peakmem_solve(self, linsys, dim): problinsolve(A=self.linsys.A, b=self.linsys.b)
def time_solve(self, linsys, dim): problinsolve(A=self.linsys.A, b=self.linsys.b)
def setup(self, linsys, dim): self.linsys = get_linear_system(name=linsys, dim=dim) xhat, _, _, _ = problinsolve(A=self.linsys.A, b=self.linsys.b) self.xhat = xhat
def peakmem_solve(self, system): """Time solving a linear system""" # pylint: disable=unused-argument problinsolve(A=self.A, b=self.b)
def peakmem_solve(self, system): """Time solving a linear system.""" problinsolve(A=self.A, b=self.b)