Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Full Support for Runtime Optimization #61

Open
coder3101 opened this issue Sep 3, 2019 · 0 comments
Open

Add Full Support for Runtime Optimization #61

coder3101 opened this issue Sep 3, 2019 · 0 comments
Assignees
Labels
coding Implementing the feature
Milestone

Comments

@coder3101
Copy link
Collaborator

coder3101 commented Sep 3, 2019

As compile time optimization of expressions are not possible due to constexpr limitations. We fall back to runtime optimization strategy that uses std::variant to optimize the expression at runtime. This has already been implemented for scalar law at this branch.

We will add this support to the main expr template branch and provide a compile-time configuration flag like BOOST_UBLAS_ENABLE_OPTIMIZATION to turn the optimizations before evaluation.

We wish to support some basic optimization operations as of now, they are mentioned below :

  • a + a = 2a (scalar addition)
  • 3b - 2b = b (scalar subtraction)
  • ab + ac = a(b+c) (Distributive law)

We will also provide a way to enable recursive optimization to some of the above rules to some extent.

This will still be experimental feature and we cannot guarantee that we could always optimize an expression that could be optimized. Simplifying Expression is an NP Hard problem.

BY DEFAULT THE EXPRESSIONS WILL NOT BE OPTIMIZED, UNLESS USER DEFINES THE CONFIGURATION MACRO. IF ENABLED, USER MUST MAKE SURE THAT ALL FUNDAMENTAL OPERATOR OVERLOADS FOR tensor::value_type EXISTS,

@coder3101 coder3101 added the coding Implementing the feature label Sep 3, 2019
@coder3101 coder3101 added this to the Post GSOC 19 milestone Sep 3, 2019
@coder3101 coder3101 self-assigned this Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding Implementing the feature
Projects
None yet
Development

No branches or pull requests

1 participant