Adding Boost.YAP expression templates
Closed this issue · 0 comments
Boost.YAP is an excellent expression template library that provides convenient functions and ways to deal and manipulate expression templates. It provides transforms that can transform the expression's Abstract Syntax Tree easily. uBLAS Tensor also uses expression templates to optimize and eliminate the creation of unnecessary temporaries but the implementation is not very reusable and is usually very difficult to implement and maintain.
I will be implementing the Boost YAP transforms that will be used to transform and traverse the AST. Some general transforms that I will be implementing are as follow :
get_extent()
: This transform returns the Extent of the node in the AST. This can be lazily or eagerly done depending upon the type of the operand nodes in the AST.count_terminal()
: This terminal returns the number of terminal nodes in the Expression.take_nth()
: This transform breaks the internal container to element-wise lazy evaluation.- Many other helpful transforms.
The work also deals with the implementation of the new expression templates and operator overloading to suffice all the operations. Including but not limited to following :
+
-
*
/
|
call()
- Many More
This Issue will be resolved after the tensor extension expression template is replated with Boost.YAP expression template and when all above-mentioned transforms and features have been implemented