xnn.ffnn.models.amoeba_ewald.matvec#

xnn.ffnn.models.amoeba_ewald.matvec(A, v)[source]#

A v for stacks of 3 x 3 matrices (M, 3, 3) and vectors (M, 3).

An elementwise product and sum: einsum would map it to a batched matrix-vector product, which the GPU libraries run as many launches of tiny problems far below the memory bandwidth.

Parameters:
Return type:

Tensor