warp.optim.linear.LinearOperator#
- class warp.optim.linear.LinearOperator(shape, dtype, device, matvec)[source]#
Linear operator to be used as left-hand-side of linear iterative solvers.
- Parameters:
The matrix-vector multiplication routine should have the following signature:
def matvec(x: wp.array, y: wp.array, z: wp.array, alpha: Scalar, beta: Scalar): '''Perform a generalized matrix-vector product. This function computes the operation z = alpha * (A @ x) + beta * y, where 'A' is the linear operator represented by this class. ''' ...
For performance reasons, by default the iterative linear solvers in this module will try to capture the calls for one or more iterations in CUDA graphs. If the matvec routine of a custom
LinearOperatorcannot be graph-captured, theuse_cuda_graph=Falseparameter should be passed to the solver function.Methods
__init__(shape, dtype, device, matvec)Attributes