Fixed compilation warnings generated by nvcc 6.5 (and below) when compiling the EIGEN_THROW macro

This commit is contained in:
Benoit Steiner 2016-09-14 09:56:11 -07:00
parent ff47717f25
commit 779faaaeba
2 changed files with 5 additions and 2 deletions

View File

@ -954,8 +954,8 @@ namespace Eigen {
# define EIGEN_CATCH(X) catch (X)
#else
# ifdef __CUDA_ARCH__
# define EIGEN_THROW_X(X) asm("trap;") return {}
# define EIGEN_THROW asm("trap;"); return {}
# define EIGEN_THROW_X(X) asm("trap;")
# define EIGEN_THROW asm("trap;")
# else
# define EIGEN_THROW_X(X) std::abort()
# define EIGEN_THROW std::abort()

View File

@ -275,6 +275,7 @@ template<typename T> EIGEN_DEVICE_FUNC inline T* construct_elements_of_array(T *
destruct_elements_of_array(ptr, i);
EIGEN_THROW;
}
return NULL;
}
/*****************************************************************************
@ -305,6 +306,7 @@ template<typename T> EIGEN_DEVICE_FUNC inline T* aligned_new(size_t size)
aligned_free(result);
EIGEN_THROW;
}
return result;
}
template<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_new(size_t size)
@ -320,6 +322,7 @@ template<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned
conditional_aligned_free<Align>(result);
EIGEN_THROW;
}
return result;
}
/** \internal Deletes objects constructed with aligned_new