From: Martin Kronbichler Date: Tue, 20 Mar 2018 08:18:40 +0000 (+0100) Subject: Mark more basic Tensor operations as always_inline. X-Git-Tag: v9.0.0-rc1~302^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81549d5f7d842241328a7ddd28b54ca60a08c44f;p=dealii.git Mark more basic Tensor operations as always_inline. --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index ee4aefd554..173c691ec7 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -950,7 +950,7 @@ void Tensor<0,dim,Number>::serialize(Archive &ar, const unsigned int) template -inline +inline DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor::Tensor () { // All members of the c-style array values are already default initialized @@ -959,7 +959,7 @@ DEAL_II_CUDA_HOST_DEV Tensor::Tensor () template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::Tensor (const array_type &initializer) { for (unsigned int i=0; i::Tensor (const array_type &initializer) template template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::Tensor (const Tensor &initializer) { for (unsigned int i=0; i!=dim; ++i) @@ -979,7 +979,7 @@ Tensor::Tensor (const Tensor &initializ template template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::Tensor (const Tensor<1,dim,Tensor > &initializer) { @@ -990,7 +990,7 @@ Tensor::Tensor template template -inline +inline DEAL_II_ALWAYS_INLINE Tensor:: operator Tensor<1,dim,Tensor > () const { @@ -1123,7 +1123,7 @@ Tensor::end_raw() const template template -inline +inline DEAL_II_ALWAYS_INLINE Tensor & Tensor::operator = (const Tensor &t) { @@ -1134,7 +1134,7 @@ Tensor::operator = (const Tensor &t) template -inline +inline DEAL_II_ALWAYS_INLINE Tensor & Tensor::operator = (const Number &d) { @@ -1420,7 +1420,7 @@ std::ostream &operator << (std::ostream &out, const Tensor<0,dim,Number> &p) * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE typename ProductType::type operator * (const Other &object, const Tensor<0,dim,Number> &t) @@ -1439,7 +1439,7 @@ operator * (const Other &object, * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE typename ProductType::type operator * (const Tensor<0,dim,Number> &t, const Other &object) @@ -1458,7 +1458,7 @@ operator * (const Tensor<0,dim,Number> &t, * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE typename ProductType::type operator * (const Tensor<0, dim, Number> &src1, const Tensor<0, dim, OtherNumber> &src2) @@ -1474,7 +1474,7 @@ operator * (const Tensor<0, dim, Number> &src1, * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<0,dim,typename ProductType::type>::type> operator / (const Tensor<0,dim,Number> &t, const OtherNumber &factor) @@ -1489,7 +1489,7 @@ operator / (const Tensor<0,dim,Number> &t, * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<0, dim, typename ProductType::type> operator+ (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q) @@ -1504,7 +1504,7 @@ operator+ (const Tensor<0,dim,Number> &p, * @relatesalso Tensor<0,dim,Number> */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<0, dim, typename ProductType::type> operator- (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q) @@ -1526,7 +1526,7 @@ operator- (const Tensor<0,dim,Number> &p, template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::type>::type> operator * (const Tensor &t, const OtherNumber &factor) @@ -1552,7 +1552,7 @@ operator * (const Tensor &t, template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::type, OtherNumber>::type> operator * (const Number &factor, const Tensor &t) @@ -1593,7 +1593,7 @@ operator / (const Tensor &t, * @relatesalso Tensor */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::type> operator+ (const Tensor &p, const Tensor &q) @@ -1615,7 +1615,7 @@ operator+ (const Tensor &p, * @relatesalso Tensor */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor::type> operator- (const Tensor &p, const Tensor &q) @@ -1708,7 +1708,7 @@ operator * (const Tensor &src1, template -inline +inline DEAL_II_ALWAYS_INLINE typename Tensor::type>::tensor_type contract (const Tensor &src1, const Tensor &src2) @@ -1832,7 +1832,7 @@ double_contract (const Tensor &src1, * @author Matthias Maier, 2015 */ template -inline +inline DEAL_II_ALWAYS_INLINE typename ProductType::type scalar_product (const Tensor &left, const Tensor &right) @@ -1921,7 +1921,7 @@ outer_product(const Tensor &src1, * @author Guido Kanschat, 2001 */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<1,dim,Number> cross_product_2d (const Tensor<1,dim,Number> &src) { @@ -1947,7 +1947,7 @@ cross_product_2d (const Tensor<1,dim,Number> &src) * @author Guido Kanschat, 2001 */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<1,dim,Number> cross_product_3d (const Tensor<1,dim,Number> &src1, const Tensor<1,dim,Number> &src2) @@ -2021,6 +2021,7 @@ Number determinant (const Tensor<2,1,Number> &t) * @author Wolfgang Bangerth, 2001 */ template +inline DEAL_II_ALWAYS_INLINE Number trace (const Tensor<2,dim,Number> &d) { Number t=d[0][0]; @@ -2129,7 +2130,7 @@ invert (const Tensor<2,3,Number> &t) * @author Wolfgang Bangerth, 2002 */ template -inline +inline DEAL_II_ALWAYS_INLINE Tensor<2,dim,Number> transpose (const Tensor<2,dim,Number> &t) {