Skip to content
Snippets Groups Projects
Commit ef4cd475 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added missing __cuda_callable__ to StaticArray and StaticVector methods

parent e202036e
No related branches found
No related tags found
1 merge request!42Refactoring for execution policies
...@@ -84,6 +84,7 @@ public: ...@@ -84,6 +84,7 @@ public:
* *
* @param elems input initializer list * @param elems input initializer list
*/ */
__cuda_callable__
StaticArray( const std::initializer_list< Value > &elems ); StaticArray( const std::initializer_list< Value > &elems );
/** /**
......
...@@ -120,6 +120,7 @@ StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v ) ...@@ -120,6 +120,7 @@ StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v )
} }
template< int Size, typename Value > template< int Size, typename Value >
__cuda_callable__
StaticArray< Size, Value >::StaticArray( const std::initializer_list< Value > &elems) StaticArray< Size, Value >::StaticArray( const std::initializer_list< Value > &elems)
{ {
auto it = elems.begin(); auto it = elems.begin();
......
...@@ -53,11 +53,13 @@ public: ...@@ -53,11 +53,13 @@ public:
/** /**
* \brief Default copy-assignment operator. * \brief Default copy-assignment operator.
*/ */
__cuda_callable__
StaticVector& operator=( const StaticVector& ) = default; StaticVector& operator=( const StaticVector& ) = default;
/** /**
* \brief Default move-assignment operator. * \brief Default move-assignment operator.
*/ */
__cuda_callable__
StaticVector& operator=( StaticVector&& ) = default; StaticVector& operator=( StaticVector&& ) = default;
//! Constructors and assignment operators are inherited from the class \ref StaticArray. //! Constructors and assignment operators are inherited from the class \ref StaticArray.
...@@ -103,6 +105,7 @@ public: ...@@ -103,6 +105,7 @@ public:
* \return reference to this vector * \return reference to this vector
*/ */
template< typename VectorExpression > template< typename VectorExpression >
__cuda_callable__
StaticVector& operator=( const VectorExpression& expression ); StaticVector& operator=( const VectorExpression& expression );
/** /**
...@@ -180,6 +183,7 @@ namespace TNL { ...@@ -180,6 +183,7 @@ namespace TNL {
namespace Containers { namespace Containers {
template< typename Real > template< typename Real >
__cuda_callable__
StaticVector< 3, Real > VectorProduct( const StaticVector< 3, Real >& u, StaticVector< 3, Real > VectorProduct( const StaticVector< 3, Real >& u,
const StaticVector< 3, Real >& v ) const StaticVector< 3, Real >& v )
{ {
...@@ -191,6 +195,7 @@ StaticVector< 3, Real > VectorProduct( const StaticVector< 3, Real >& u, ...@@ -191,6 +195,7 @@ StaticVector< 3, Real > VectorProduct( const StaticVector< 3, Real >& u,
} }
template< typename Real > template< typename Real >
__cuda_callable__
Real TriangleArea( const StaticVector< 2, Real >& a, Real TriangleArea( const StaticVector< 2, Real >& a,
const StaticVector< 2, Real >& b, const StaticVector< 2, Real >& b,
const StaticVector< 2, Real >& c ) const StaticVector< 2, Real >& c )
...@@ -208,6 +213,7 @@ Real TriangleArea( const StaticVector< 2, Real >& a, ...@@ -208,6 +213,7 @@ Real TriangleArea( const StaticVector< 2, Real >& a,
} }
template< typename Real > template< typename Real >
__cuda_callable__
Real TriangleArea( const StaticVector< 3, Real >& a, Real TriangleArea( const StaticVector< 3, Real >& a,
const StaticVector< 3, Real >& b, const StaticVector< 3, Real >& b,
const StaticVector< 3, Real >& c ) const StaticVector< 3, Real >& c )
......
...@@ -20,6 +20,7 @@ template< int Size, typename Real > ...@@ -20,6 +20,7 @@ template< int Size, typename Real >
template< typename T1, template< typename T1,
typename T2, typename T2,
template< typename, typename > class Operation > template< typename, typename > class Operation >
__cuda_callable__
StaticVector< Size, Real >::StaticVector( const Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation >& expr ) StaticVector< Size, Real >::StaticVector( const Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation >& expr )
{ {
detail::VectorAssignment< StaticVector< Size, Real >, Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > >::assignStatic( *this, expr ); detail::VectorAssignment< StaticVector< Size, Real >, Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > >::assignStatic( *this, expr );
...@@ -52,6 +53,7 @@ StaticVector< Size, Real >::setup( const Config::ParameterContainer& parameters, ...@@ -52,6 +53,7 @@ StaticVector< Size, Real >::setup( const Config::ParameterContainer& parameters,
template< int Size, typename Real > template< int Size, typename Real >
template< typename VectorExpression > template< typename VectorExpression >
__cuda_callable__
StaticVector< Size, Real >& StaticVector< Size, Real >&
StaticVector< Size, Real >::operator=( const VectorExpression& expression ) StaticVector< Size, Real >::operator=( const VectorExpression& expression )
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment