stan-dev / nomad

Fast autodiff.
Other
19 stars 2 forks source link

Implement Eigen Operations #7

Open betanalpha opened 10 years ago

betanalpha commented 10 years ago

Right now we have an efficient matrix multiplication operation that admits expression template arguments but it only works for functions and not for operator overloading. Investigate this issue and see if we can have proper operator overloading.

bob-carpenter commented 10 years ago

The trick's going to be avoiding conflict with Eigen's existing operator overloads for the arithmetic operators on matrices. Maybe if we write something specific for var-based arguments, it'll pick up our definitions as more specific.

On Jul 2, 2014, at 3:19 PM, Michael Betancourt notifications@github.com wrote:

Right now we have an efficient matrix multiplication operation that admits expression template arguments but it only works for functions and not for operator overloading. Investigate this issue and see if we can have proper operator overloading.

— Reply to this email directly or view it on GitHub.

betanalpha commented 10 years ago

Yeah, but the problem is that the vars are tucked deeply into the expression templates and it's not clear how to explicitly define them in a generic way. Anyways, not an immediate concern but something to keep in mind as we start reimplementing all of the linear algebra.

On Wed, Jul 2, 2014 at 2:42 PM, Bob Carpenter notifications@github.com wrote:

The trick's going to be avoiding conflict with Eigen's existing operator overloads for the arithmetic operators on matrices. Maybe if we write something specific for var-based arguments, it'll pick up our definitions as more specific.

  • Bob

On Jul 2, 2014, at 3:19 PM, Michael Betancourt notifications@github.com wrote:

Right now we have an efficient matrix multiplication operation that admits expression template arguments but it only works for functions and not for operator overloading. Investigate this issue and see if we can have proper operator overloading.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/stan-dev/nomad/issues/7#issuecomment-47777025.

bob-carpenter commented 10 years ago

It'd require some enable_if-ing, I suppose. It has to be resolvable at the template definition level.

On Jul 2, 2014, at 3:46 PM, Michael Betancourt notifications@github.com wrote:

Yeah, but the problem is that the vars are tucked deeply into the expression templates and it's not clear how to explicitly define them in a generic way. Anyways, not an immediate concern but something to keep in mind as we start reimplementing all of the linear algebra.

On Wed, Jul 2, 2014 at 2:42 PM, Bob Carpenter notifications@github.com wrote:

The trick's going to be avoiding conflict with Eigen's existing operator overloads for the arithmetic operators on matrices. Maybe if we write something specific for var-based arguments, it'll pick up our definitions as more specific.

  • Bob

On Jul 2, 2014, at 3:19 PM, Michael Betancourt notifications@github.com wrote:

Right now we have an efficient matrix multiplication operation that admits expression template arguments but it only works for functions and not for operator overloading. Investigate this issue and see if we can have proper operator overloading.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/stan-dev/nomad/issues/7#issuecomment-47777025.

— Reply to this email directly or view it on GitHub.

rgiordan commented 8 years ago

Daniel Lee pointed me to Nomad, and it looks promising, but some preliminary exploration and this issue suggests that linear algebra isn't really working yet. And this issue is pretty old! Should I assume that Nomad is not going to be developed in the near future?

betanalpha commented 8 years ago

In some sense Nomad was a proof of principle for a new, super-efficient approach to higher-order autodiff and I stopped playing around with it once it had complete support for the cmath library and that principle was proven. As we push forward into higher-order methods I certainly hope that we'll come back to Nomad -- it would especially be great to have more people looking at the code and playing around with potential Eigen support!