Loading src/TNL/Pointers/SharedPointerCuda.h +28 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,34 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer this->allocate( args... ); } /** * \brief Constructor with initializer list. * * \tparam Value is type of the initializer list elements. * \param list is the instance of the initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< Value > list ) : pd( nullptr ), cuda_pointer( nullptr ) { this->allocate( list ); } /** * \brief Constructor with nested initializer lists. * * \tparam Value is type of the nested initializer list elements. * \param list is the instance of the nested initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< std::initializer_list< Value > > list ) : pd( nullptr ), cuda_pointer( nullptr ) { this->allocate( list ); } /** * \brief Copy constructor. * Loading src/TNL/Pointers/SharedPointerHost.h +33 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer * \brief Constructor with parameters of the Object constructor. * * \tparam Args is variadic template type of arguments of the Object constructor. * \tparam args are arguments passed to the Object constructor. * \param args are arguments passed to the Object constructor. */ template< typename... Args > explicit SharedPointer( Args... args ) Loading @@ -85,6 +85,38 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer this->allocate( args... ); } /** * \brief Constructor with initializer list. * * \tparam Value is type of the initializer list elements. * \param list is the instance of the initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< Value > list ) : pd( nullptr ) { #ifdef TNL_DEBUG_SHARED_POINTERS std::cerr << "Creating shared pointer to " << getType< ObjectType >() << std::endl; #endif this->allocate( list ); } /** * \brief Constructor with nested initializer lists. * * \tparam Value is type of the nested initializer list elements. * \param list is the instance of the nested initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< std::initializer_list< Value > > list ) : pd( nullptr ) { #ifdef TNL_DEBUG_SHARED_POINTERS std::cerr << "Creating shared pointer to " << getType< ObjectType >() << std::endl; #endif this->allocate( list ); } /** * \brief Copy constructor. * Loading Loading
src/TNL/Pointers/SharedPointerCuda.h +28 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,34 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer this->allocate( args... ); } /** * \brief Constructor with initializer list. * * \tparam Value is type of the initializer list elements. * \param list is the instance of the initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< Value > list ) : pd( nullptr ), cuda_pointer( nullptr ) { this->allocate( list ); } /** * \brief Constructor with nested initializer lists. * * \tparam Value is type of the nested initializer list elements. * \param list is the instance of the nested initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< std::initializer_list< Value > > list ) : pd( nullptr ), cuda_pointer( nullptr ) { this->allocate( list ); } /** * \brief Copy constructor. * Loading
src/TNL/Pointers/SharedPointerHost.h +33 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer * \brief Constructor with parameters of the Object constructor. * * \tparam Args is variadic template type of arguments of the Object constructor. * \tparam args are arguments passed to the Object constructor. * \param args are arguments passed to the Object constructor. */ template< typename... Args > explicit SharedPointer( Args... args ) Loading @@ -85,6 +85,38 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer this->allocate( args... ); } /** * \brief Constructor with initializer list. * * \tparam Value is type of the initializer list elements. * \param list is the instance of the initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< Value > list ) : pd( nullptr ) { #ifdef TNL_DEBUG_SHARED_POINTERS std::cerr << "Creating shared pointer to " << getType< ObjectType >() << std::endl; #endif this->allocate( list ); } /** * \brief Constructor with nested initializer lists. * * \tparam Value is type of the nested initializer list elements. * \param list is the instance of the nested initializer list.. */ template< typename Value > explicit SharedPointer( std::initializer_list< std::initializer_list< Value > > list ) : pd( nullptr ) { #ifdef TNL_DEBUG_SHARED_POINTERS std::cerr << "Creating shared pointer to " << getType< ObjectType >() << std::endl; #endif this->allocate( list ); } /** * \brief Copy constructor. * Loading