-
Notifications
You must be signed in to change notification settings - Fork 151
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
Error when compiling tensor with NDEBUG #82
Comments
Thanks @dubek for reporting this issue. Your observation is correct and this is a bug. Sorry for the inconvenience. I doubt that you will have severe performance penalties for tensor operations when not using the In general, Boost.uBlas is in a transition and we are about to generalize the tensor concept. The |
Thanks, I'll look at TTV. The problem with compiling without |
Sorry to hear that. We do our best to yield a high-code coverage with unit-tests. |
Met the same compilation error with NDEBUG defined today. After some digging into tensor's code, I guess it is due to the wrong position of Take the code at line 214-216 of strides.hpp for example.
When NDEBUG is defined,
which cause syntax error. The proper code should be There are several such BOOST_UBLAS_INLINE before The issue is still seen with boost 1.77.0 release. Regards, |
This problem still exits in v1.80.0 |
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
With -DNDEBUG BOOST_UBLAS_INLINE actually expands to `inline` causing instances of the following code to be a syntax error: BOOST_UBLAS_INLINE template<class size_type, class layout_type> This bug has already been reported upstream at boostorg/ublas#82. It has been fixed in the `develop` branch but not released yet.
I'm compiling a simple program which includes the
tensor.hpp
header:This works fine if I don't define
NDEBUG
. However, in release mode with (-DNDEBUG
argument to the compiler), this fails:As you can see in compiler explorer, this happens both on gcc 9.3 and clang 10.0.0 with these command-line options:
-DNDEBUG -std=c++17
I also found that adding
#define BOOST_UBLAS_INLINE
before includingtensor.hpp
solves the compilation problem (but, of course, cancels inlining which probably hurts performance).Am I using the wrong compilation options? ublas' documentation says I should define
NDEBUG
preprocessor symbol to get proper performance (release mode). I assume tensor was tested with-DNDEBUG
and-O3
etc. BTW I think that the error reported in #79 might also be related to-DNDEBUG
.The text was updated successfully, but these errors were encountered: