FreePOOMA  2.4.1
Classes
BinaryTensorOp.h File Reference

An engine class for representing the sum, product, etc. More...

This graph shows which files directly or indirectly include this file:

Classes

class  TensorEngine< D, T, BinaryTensorOp< V1, V2, Op > >
 Specialization of TensorEngine for BinaryTensorOp. More...
struct  TensorEngineElem< D, T, BinaryTensorOp< V1, V2, Op >, I, J, 1 >
 Specialization of TensorElem for BinaryTensorOp. More...

Detailed Description

An engine class for representing the sum, product, etc.

between two Tensors. This is used as part of evaluating expressions.

This specialization of TensorEngine implements an optimization for expression evaluation. Binary operations are done by constructing tensor with a BinaryTensorOp engine tag, then the result of the operation is constructed by "copying out of" that one. Copying each element out of one of these causes the binary expression to be evaluated for that point.

This strategy reduces the number of copies that get made duing expression evaluations.