DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::host_device_vector_r0< T > Struct Template Reference

Legacy std::vector<T> subclass with an optional device mirror. More...

#include <Vector.hpp>

Inheritance diagram for DNDS::host_device_vector_r0< T >:
[legend]
Collaboration diagram for DNDS::host_device_vector_r0< T >:
[legend]

Public Types

using t_base = std::vector< T >
 
using t_self = host_device_vector_r0< T >
 
template<DeviceBackend B, typename TSize = int64_t>
using t_deviceView = vector_DeviceView< B, T, TSize >
 

Public Member Functions

DNDS_HOST host_device_vector_r0 (const std::vector< T > &v)
 
DNDS_HOST host_device_vector_r0 (t_self &&R) noexcept=default
 Move constructor: moves vector data + transfers device storage.
 
DNDS_HOST t_selfoperator= (t_self &&R) noexcept=default
 Move assignment.
 
 ~host_device_vector_r0 ()=default
 
DNDS_HOST t_selfoperator= (const std::vector< T > &v)
 
void to_device (DeviceBackend backend=DeviceBackend::Host)
 
void to_host ()
 
T * dataDevice ()
 
template<DeviceBackend B, typename TSize = int64_t>
t_deviceView< B, TSizedeviceView ()
 
const T * dataDevice () const
 
t_selfoperator= (const t_self &R)
 
 host_device_vector_r0 (const t_self &R)
 
DeviceBackend device ()
 
void clear_device ()
 
void swap (t_self &R) noexcept
 

Public Attributes

t_supDeviceStorageBase deviceStorage = null_supDeviceStorageBase()
 

Detailed Description

template<typename T>
struct DNDS::host_device_vector_r0< T >

Legacy std::vector<T> subclass with an optional device mirror.

Simpler predecessor of #host_device_vector_r1, kept for third-party interop that expected a true std::vector<T>. Prefer host_device_vector (aliased to _r1) for new code.

Definition at line 444 of file Vector.hpp.

Member Typedef Documentation

◆ t_base

template<typename T >
using DNDS::host_device_vector_r0< T >::t_base = std::vector<T>

Definition at line 448 of file Vector.hpp.

◆ t_deviceView

template<typename T >
template<DeviceBackend B, typename TSize = int64_t>
using DNDS::host_device_vector_r0< T >::t_deviceView = vector_DeviceView<B, T, TSize>

Definition at line 501 of file Vector.hpp.

◆ t_self

Definition at line 450 of file Vector.hpp.

Constructor & Destructor Documentation

◆ host_device_vector_r0() [1/3]

template<typename T >
DNDS_HOST DNDS::host_device_vector_r0< T >::host_device_vector_r0 ( const std::vector< T > &  v)
inline

Definition at line 454 of file Vector.hpp.

◆ host_device_vector_r0() [2/3]

template<typename T >
DNDS_HOST DNDS::host_device_vector_r0< T >::host_device_vector_r0 ( t_self &&  R)
defaultnoexcept

Move constructor: moves vector data + transfers device storage.

◆ ~host_device_vector_r0()

◆ host_device_vector_r0() [3/3]

template<typename T >
DNDS::host_device_vector_r0< T >::host_device_vector_r0 ( const t_self R)
inline

Definition at line 533 of file Vector.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ clear_device()

template<typename T >
void DNDS::host_device_vector_r0< T >::clear_device ( )
inline

Definition at line 549 of file Vector.hpp.

◆ dataDevice() [1/2]

template<typename T >
T * DNDS::host_device_vector_r0< T >::dataDevice ( )
inline

Definition at line 495 of file Vector.hpp.

Here is the caller graph for this function:

◆ dataDevice() [2/2]

template<typename T >
const T * DNDS::host_device_vector_r0< T >::dataDevice ( ) const
inline

Definition at line 513 of file Vector.hpp.

◆ device()

template<typename T >
DeviceBackend DNDS::host_device_vector_r0< T >::device ( )
inline

Definition at line 544 of file Vector.hpp.

Here is the caller graph for this function:

◆ deviceView()

template<typename T >
template<DeviceBackend B, typename TSize = int64_t>
t_deviceView< B, TSize > DNDS::host_device_vector_r0< T >::deviceView ( )
inline

Definition at line 503 of file Vector.hpp.

Here is the call graph for this function:

◆ operator=() [1/3]

template<typename T >
DNDS_HOST t_self & DNDS::host_device_vector_r0< T >::operator= ( const std::vector< T > &  v)
inline

Definition at line 462 of file Vector.hpp.

◆ operator=() [2/3]

template<typename T >
t_self & DNDS::host_device_vector_r0< T >::operator= ( const t_self R)
inline

Definition at line 518 of file Vector.hpp.

Here is the call graph for this function:

◆ operator=() [3/3]

template<typename T >
DNDS_HOST t_self & DNDS::host_device_vector_r0< T >::operator= ( t_self &&  R)
defaultnoexcept

Move assignment.

◆ swap()

template<typename T >
void DNDS::host_device_vector_r0< T >::swap ( t_self R)
inlinenoexcept

Definition at line 554 of file Vector.hpp.

◆ to_device()

template<typename T >
void DNDS::host_device_vector_r0< T >::to_device ( DeviceBackend  backend = DeviceBackend::Host)
inline

Definition at line 476 of file Vector.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_host()

template<typename T >
void DNDS::host_device_vector_r0< T >::to_host ( )
inline

Definition at line 486 of file Vector.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ deviceStorage

Definition at line 452 of file Vector.hpp.


The documentation for this struct was generated from the following file: