The algebraic complexity of computing a family of bilinear forms