Gael Guennebaud
62134082aa
Update AutoDiffScalar wrt to scalar-multiple.
2016-06-14 15:06:35 +02:00
Gael Guennebaud
5d38203735
Update Tensor module to use bind1st_op and bind2nd_op
2016-06-14 15:06:03 +02:00
Gael Guennebaud
396d9cfb6e
Generalize expr.pow(scalar), pow(expr,scalar) and pow(scalar,expr).
...
Internal: scalar_pow_op (unary) is removed, and scalar_binary_pow_op is renamed scalar_pow_op.
2016-06-14 14:10:07 +02:00
Gael Guennebaud
a9bb653a68
Update doc (scalar_add_op is now deprecated)
2016-06-14 12:07:00 +02:00
Gael Guennebaud
a8c08e8b8e
Implement expr+scalar, scalar+expr, expr-scalar, and scalar-expr as binary expressions, and generalize supported scalar types.
...
The following functors are now deprecated: scalar_add_op, scalar_sub_op, and scalar_rsub_op.
2016-06-14 12:06:10 +02:00
Gael Guennebaud
756ac4a93d
Fix doc.
2016-06-14 12:03:39 +02:00
Gael Guennebaud
f925dba3d9
Fix compilation of BVH example
2016-06-14 11:32:09 +02:00
Gael Guennebaud
12350d3ac7
Add unit test for AlignedBox::center
2016-06-14 11:31:52 +02:00
Gael Guennebaud
bcc0f38f98
Add unittesting plugins to scalar_product_op and scalar_quotient_op to help chaking that types are properly propagated.
2016-06-14 11:31:27 +02:00
Gael Guennebaud
f57fd78e30
Generalize coeff-wise sparse products to support different scalar types
2016-06-14 11:29:54 +02:00
Gael Guennebaud
f5b1c73945
Set cost of constant expression to 0 (the cost should be amortized through the expression)
2016-06-14 11:29:06 +02:00
Gael Guennebaud
deb8306e60
Move MatrixBase::operaotr*(UniformScaling) as a free function in Scaling.h, and fix return type.
2016-06-14 11:28:03 +02:00
Gael Guennebaud
64fcfd314f
Implement scalar multiples and division by a scalar as a binary-expression with a constant expression.
...
This slightly complexifies the type of the expressions and implies that we now have to distinguish between scalar*expr and expr*scalar to catch scalar-multiple expression (e.g., see BlasUtil.h), but this brings several advantages:
- it makes it clear on each side the scalar is applied,
- it clearly reflects that we are dealing with a binary-expression,
- the complexity of the type is hidden through macros defined at the end of Macros.h,
- distinguishing between "scalar op expr" and "expr op scalar" is important to support non commutative fields (like quaternions)
- "scalar op expr" is now fully equivalent to "ConstantExpr(scalar) op expr"
- scalar_multiple_op, scalar_quotient1_op and scalar_quotient2_op are not used anymore in officially supported modules (still used in Tensor)
2016-06-14 11:26:57 +02:00
Gael Guennebaud
39781dc1e2
Fix compilation of evaluator unit test
2016-06-14 11:03:26 +02:00
Gael Guennebaud
3c12e24164
Add bind1st_op and bind2nd_op helpers to turn binary functors into unary ones, and implement scalar_multiple2 and scalar_quotient2 on top of them.
2016-06-13 16:18:59 +02:00
Gael Guennebaud
7a9ef7bbb4
Add default template parameters for the second scalar type of binary functors.
...
This enhences backward compatibility.
2016-06-13 16:17:23 +02:00
Gael Guennebaud
2ca2ffb65e
check for mixing types in "array / scalar" expressions
2016-06-13 16:15:32 +02:00
Gael Guennebaud
fabae6c9a1
Cleanup
2016-06-10 15:58:33 +02:00
Gael Guennebaud
5de8d7036b
Add real.pow(complex), complex.pow(real) unit tests.
2016-06-10 15:58:22 +02:00
Gael Guennebaud
5fdd703629
Enable mixing types in numext::pow
2016-06-10 15:58:04 +02:00
Gael Guennebaud
2e238bafb6
Big 279: enable mixing types for comparisons, min, and max.
2016-06-10 15:05:43 +02:00
Gael Guennebaud
2c462f4201
Clean handling for void type in EIGEN_CHECK_BINARY_COMPATIBILIY
2016-06-06 23:11:38 +02:00
Gael Guennebaud
3d71d3918e
Disable shortcuts for res ?= prod when the scalar types do not match exactly.
2016-06-06 23:10:55 +02:00
Gael Guennebaud
66e99ab6a1
Relax mixing-type constraints for binary coefficient-wise operators:
...
- Replace internal::scalar_product_traits<A,B> by Eigen::ScalarBinaryOpTraits<A,B,OP>
- Remove the "functor_is_product_like" helper (was pretty ugly)
- Currently, OP is not used, but it is available to the user for fine grained tuning
- Currently, only the following operators have been generalized: *,/,+,-,=,*=,/=,+=,-=
- TODO: generalize all other binray operators (comparisons,pow,etc.)
- TODO: handle "scalar op array" operators (currently only * is handled)
- TODO: move the handling of the "void" scalar type to ScalarBinaryOpTraits
2016-06-06 15:11:41 +02:00
Benoit Steiner
1f1e0b9e30
Silenced compilation warning
2016-06-05 12:59:11 -07:00
Benoit Steiner
5b95b4daf9
Moved static assertions into the class constructor to make the code more portable
2016-06-05 12:57:48 -07:00
Christoph Hertzberg
d7e3e4bb04
Removed executable bits from header files.
2016-06-05 10:15:41 +02:00
Eugene Brevdo
c53687dd14
Add randomized properties tests for betainc special function.
2016-06-05 11:10:30 -07:00
Eugene Brevdo
39baff850c
Add TernaryFunctors and the betainc SpecialFunction.
...
TernaryFunctors and their executors allow operations on 3-tuples of inputs.
API fully implemented for Arrays and Tensors based on binary functors.
Ported the cephes betainc function (regularized incomplete beta
integral) to Eigen, with support for CPU and GPU, floats, doubles, and
half types.
Added unit tests in array.cpp and cxx11_tensor_cuda.cu
Collapsed revision
* Merged helper methods for betainc across floats and doubles.
* Added TensorGlobalFunctions with betainc(). Removed betainc() from TensorBase.
* Clean up CwiseTernaryOp checks, change igamma_helper to cephes_helper.
* betainc: merge incbcf and incbd into incbeta_cfe. and more cleanup.
* Update TernaryOp and SpecialFunctions (betainc) based on review comments.
2016-06-02 17:04:19 -07:00
Benoit Steiner
02db4e1a82
Disable the tensor tests when using msvc since older versions of the compiler fail to handle this code
2016-06-04 08:21:17 -07:00
Benoit Steiner
c21eaedce6
Use array_prod to compute the number of elements contained in the input tensor expression
2016-06-04 07:47:04 -07:00
Benoit Steiner
36a4500822
Merged in ibab/eigen (pull request PR-192)
...
Add generic scan method
2016-06-03 17:28:33 -07:00
Benoit Steiner
c2a102345f
Improved the performance of full reductions.
...
AFTER:
BM_fullReduction/10 4541 4543 154017 21.0M items/s
BM_fullReduction/64 5191 5193 100000 752.5M items/s
BM_fullReduction/512 9588 9588 71361 25.5G items/s
BM_fullReduction/4k 244314 244281 2863 64.0G items/s
BM_fullReduction/5k 359382 359363 1946 64.8G items/s
BEFORE:
BM_fullReduction/10 9085 9087 74395 10.5M items/s
BM_fullReduction/64 9478 9478 72014 412.1M items/s
BM_fullReduction/512 14643 14646 46902 16.7G items/s
BM_fullReduction/4k 260338 260384 2678 60.0G items/s
BM_fullReduction/5k 385076 385178 1818 60.5G items/s
2016-06-03 17:27:08 -07:00
Igor Babuschkin
dc03b8f3a1
Add generic scan method
2016-06-03 17:37:04 +01:00
Gael Guennebaud
8d97ba6b22
bug #725 : make move ctor/assignment noexcept.
2016-06-03 14:28:25 +02:00
Gael Guennebaud
e8b922ca63
Fix MatrixFunctions module.
2016-06-03 09:21:35 +02:00
Gael Guennebaud
82293f38d6
Fix unit test.
2016-06-03 08:12:14 +02:00
Gael Guennebaud
fe62c06d9b
Fix compilation.
2016-06-03 07:47:38 +02:00
Gael Guennebaud
969b8959a0
Fix compilation: Matrix does not indirectly live in the internal namespace anymore!
2016-06-03 07:44:58 +02:00
Gael Guennebaud
f2c2465acc
Fix function dependencies
2016-06-03 07:44:18 +02:00
Benoit Steiner
c3c8ad8046
Align the first element of the Waiter struct instead of padding it. This reduces its memory footprint a bit while achieving the goal of preventing false sharing
2016-06-02 21:17:41 -07:00
Gael Guennebaud
5b77481d58
merge
2016-06-02 22:21:45 +02:00
Gael Guennebaud
53feb73b45
Remove dead code.
2016-06-02 22:19:55 +02:00
Gael Guennebaud
2c00ac0b53
Implement generic scalar*expr and expr*scalar operator based on scalar_product_traits.
...
This is especially useful for custom scalar types, e.g., to enable float*expr<multi_prec> without conversion.
2016-06-02 22:16:37 +02:00
Rasmus Munk Larsen
811aadbe00
Add syntactic sugar to Eigen tensors to allow more natural syntax.
...
Specifically, this enables expressions involving:
scalar + tensor
scalar * tensor
scalar / tensor
scalar - tensor
2016-06-02 12:41:28 -07:00
Benoit Steiner
6021c90fdf
Merged in ibab/eigen (pull request PR-189)
...
Add scan op to Tensor module
2016-06-02 08:08:11 -07:00
Gael Guennebaud
8b6f53222b
bug #1193 : fix lpNorm<Infinity> for empty input.
2016-06-02 15:29:59 +02:00
Gael Guennebaud
d616a81294
Disable MSVC's "decorated name length exceeded, name was truncated" warning in unit tests.
2016-06-02 14:48:38 +02:00
Gael Guennebaud
61a32f2a4c
Fix pointer to long conversion warning.
2016-06-02 14:45:45 +02:00
Igor Babuschkin
fbd7ed6ff7
Add tensor scan op
...
This is the initial implementation a generic scan operation.
Based on this, cumsum and cumprod method have been added to TensorBase.
2016-06-02 13:35:47 +01:00