It is easy to vectorize the formation of
since
each element
can be written as
independent of
apart from multiplication by a factor
. The vectorized algorithm for the
evaluation of
, adapted from reference [17],
appears in Figure 5. An analogous algorithm
can be used to obtain
. However, we can also obtain
for
states by
![]()
as proven by Olsen and co-workers [17].

Figure 7: Vectorized Algorithm for
.
A fairly straightforward algorithm for evaluating
is
presented in Figure 6. The vectorized
algorithm for the evaluation of
is presented in
Figure 7. This algorithm makes use of a
gather and scatter operation to avoid indirect addressing.

Figure 6: Simple Algorithm for
.

Figure: Vectorized Algorithm for
.
For
, an improvement to the
algorithm can be made
by utilizing an identity similar to equation (6.31).
The ijklth component of
is related to the klijth
component via
![]()