OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor > Class Template Reference

Detailed Description

template<typename T, typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
class openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >

Definition at line 788 of file map_vector_sparse.hpp.

Public Member Functions

auto getIndexBuffer () -> decltype(vct_index)&
 Get the indices buffer.
 
auto getDataBuffer () -> decltype(vct_data)&
 Get the data buffer.
 
auto getIndexBuffer () const -> const decltype(vct_index)&
 Get the indices buffer.
 
auto getDataBuffer () const -> const decltype(vct_data)&
 Get the data buffer.
 
openfpm::sparse_index< Ti > get_sparse (Ti id) const
 Get the sparse index.
 
template<unsigned int p>
auto get (Ti id) const -> decltype(vct_data.template get< p >(id))
 Get an element of the vector.
 
auto get (Ti id) const -> decltype(vct_data.get(id))
 Get an element of the vector.
 
void resize (size_t n)
 resize to n elements
 
void swapIndexVector (vector< aggregate< Ti >, Memory, layout_base, grow_p > &iv)
 
template<unsigned int p>
auto getBackground () const -> decltype(vct_data.template get< p >(vct_data.size() -1))
 Set the background to bck (which value get must return when the value is not find)
 
auto getBackground () const -> decltype(vct_data.get(vct_data.size() -1))
 Set the background to bck (which value get must return when the value is not find)
 
template<unsigned int p>
void setBackground (const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &bck_)
 
template<unsigned int p>
auto insert (Ti ele) -> decltype(vct_data.template get< p >(0))
 It insert an element in the sparse vector.
 
template<unsigned int p>
auto insertFlush (Ti ele, bool &is_new) -> decltype(vct_data.template get< p >(0))
 It insert an element in the sparse vector.
 
auto insertFlush (Ti ele, bool &is_new) -> decltype(vct_data.get(0))
 It insert an element in the sparse vector.
 
auto insert (Ti ele) -> decltype(vct_data.get(0))
 It insert an element in the sparse vector.
 
template<typename ... v_reduce>
void flush_v (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_cont_0, gpu::ofp_context_t &context, flush_type opt=FLUSH_ON_HOST, int i=0)
 merge the added element to the main data array but save the insert buffer in v
 
template<typename ... v_reduce>
void flush_vd (vector< T, Memory, layout_base, grow_p > &vct_add_data_reord, gpu::ofp_context_t &context, flush_type opt=FLUSH_ON_HOST)
 merge the added element to the main data array but save the insert buffer in v
 
template<typename ... v_reduce>
void flush (gpu::ofp_context_t &context, flush_type opt=FLUSH_ON_HOST)
 merge the added element to the main data array
 
void flush_remove (gpu::ofp_context_t &context, flush_type opt=FLUSH_ON_HOST)
 merge the added element to the main data array
 
size_t size ()
 Return how many element you have in this map.
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > & private_get_vct_index ()
 Return the sorted vector of the indexes.
 
template<unsigned int ... prp>
void deviceToHost ()
 Transfer from device to host.
 
template<unsigned int ... prp>
void hostToDevice ()
 Transfer from host to device.
 
vector_sparse_gpu_ker< T, Ti, layout_base > toKernel ()
 toKernel function transform this structure into one that can be used on GPU
 
void setGPUInsertBuffer (int nblock, int nslot)
 set the gpu insert buffer for every block
 
void preFlush ()
 In case we manually set the added index buffer and the add data buffer we have to call this function before flush.
 
auto getGPUInsertBuffer () -> decltype(vct_add_data)&
 Get the GPU insert buffer.
 
void setGPURemoveBuffer (int nblock, int nslot)
 set the gpu remove buffer for every block
 
void clear ()
 Clear all from all the elements.
 
void swap (vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor > &sp)
 
vector< T, Memory, layout_base, grow_p > & private_get_vct_add_data ()
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > & private_get_vct_add_index ()
 
const vector< aggregate< Ti >, Memory, layout_base, grow_p > & private_get_vct_add_index () const
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > & private_get_vct_nadd_index ()
 
const vector< aggregate< Ti >, Memory, layout_base, grow_p > & private_get_vct_nadd_index () const
 
auto getSegmentToOutMap () -> decltype(blf.get_outputMap())
 
auto getSegmentToOutMap () const -> decltype(blf.get_outputMap())
 
void removeUnusedBuffers ()
 Eliminate many internal temporary buffer you can use this between flushes if you get some out of memory.
 
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > & getSegmentToMergeIndexMap ()
 
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > & getSegmentToMergeIndexMap () const
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > & getMappingVector ()
 Return the mapping vector.
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > & getMergeIndexMapVector ()
 Return the merge mapping vector.
 

Private Member Functions

template<bool prefetch>
Ti _branchfree_search_nobck (Ti x, Ti &id) const
 get the element i
 
template<bool prefetch>
void _branchfree_search (Ti x, Ti &id) const
 get the element i
 
size_t make_continuos (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_nadd_index, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_cont_index, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_cont_index_map, vector< T, Memory, layout_base, grow_p > &vct_add_data, vector< T, Memory, layout_base, grow_p > &vct_add_data_cont, gpu::ofp_context_t &context)
 
void reorder_indexes (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_cont_index, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_cont_index_map, vector< T, Memory, layout_base, grow_p > &vct_add_data_reord, vector< T, Memory, layout_base, grow_p > &vct_add_data_cont, gpu::ofp_context_t &context)
 sort the continuos array of inserted key
 
template<typename ... v_reduce>
void merge_indexes (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_sort, vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > &vct_add_index_unique, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_merge_index, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_merge_index_map, gpu::ofp_context_t &context)
 Merge indexes.
 
template<typename ... v_reduce>
void merge_datas (vector< T, Memory, layout_base, grow_p > &vct_add_data_reord, vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > &segments_new, vector< T, Memory, layout_base, grow_p > &vct_add_data, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_data_reord_map, gpu::ofp_context_t &context)
 
template<typename ... v_reduce>
void flush_on_gpu_insert (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_cont_0, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_cont_1, vector< T, Memory, layout_base, grow_p > &vct_add_data_reord, gpu::ofp_context_t &context)
 
void flush_on_gpu_remove (gpu::ofp_context_t &context)
 
void resetBck ()
 
template<typename ... v_reduce>
void flush_on_gpu (vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_cont_0, vector< aggregate< Ti >, Memory, layout_base, grow_p > &vct_add_index_cont_1, vector< T, Memory, layout_base, grow_p > &vct_add_data_reord, gpu::ofp_context_t &context)
 
template<typename ... v_reduce>
void flush_on_cpu ()
 

Private Attributes

vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_index
 
vector< T, Memory, layout_base, grow_p, impl > vct_data
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_m_index
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_add_index
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_rem_index
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_nadd_index
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_nrem_index
 
vector< T, Memory, layout_base, grow_p > vct_add_data
 
vector< T, Memory, layout_base, grow_p > vct_add_data_reord
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_add_index_cont_0
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_add_index_cont_1
 
vector< T, Memory, layout_base, grow_p > vct_add_data_cont
 
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > vct_add_index_unique
 
vector< aggregate< int, int >, Memory, layout_base, grow_p > segments_int
 
vector< T, Memory, layout_base, grow_p, impl > vct_add_data_unique
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_index_tmp4
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_index_tmp
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_index_tmp2
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_index_tmp3
 
vector< aggregate< Ti, Ti, Ti >, Memory, layout_base, grow_p > vct_index_dtmp
 
vector< aggregate< Ti >, Memory, layout_base, grow_p > vct_segment_index_map
 
block_functor blf
 
bck
 
CudaMemory mem
 
openfpm::vector< reorder< Ti > > reorder_add_index_cpu
 
size_t max_ele
 
int n_gpu_add_block_slot = 0
 
int n_gpu_rem_block_slot = 0
 

Constructor & Destructor Documentation

◆ vector_sparse()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vector_sparse ( )
inline

Definition at line 1497 of file map_vector_sparse.hpp.

Member Function Documentation

◆ _branchfree_search()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<bool prefetch>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::_branchfree_search ( Ti  x,
Ti &  id 
) const
inlineprivate

get the element i

search the element x

Parameters
ielement i

Definition at line 868 of file map_vector_sparse.hpp.

◆ _branchfree_search_nobck()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<bool prefetch>
Ti openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::_branchfree_search_nobck ( Ti  x,
Ti &  id 
) const
inlineprivate

get the element i

search the element x

Parameters
ielement i

Definition at line 838 of file map_vector_sparse.hpp.

◆ clear()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::clear ( )
inline

Clear all from all the elements.

Definition at line 1961 of file map_vector_sparse.hpp.

◆ deviceToHost()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int ... prp>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::deviceToHost ( )
inline

Transfer from device to host.

Template Parameters
setof parameters to transfer to host

Definition at line 1850 of file map_vector_sparse.hpp.

◆ flush()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush ( gpu::ofp_context_t context,
flush_type  opt = FLUSH_ON_HOST 
)
inline

merge the added element to the main data array

Parameters
optoptions

Definition at line 1793 of file map_vector_sparse.hpp.

◆ flush_on_cpu()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_on_cpu ( )
inlineprivate

Definition at line 1385 of file map_vector_sparse.hpp.

◆ flush_on_gpu()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_on_gpu ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_cont_0,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_cont_1,
vector< T, Memory, layout_base, grow_p > &  vct_add_data_reord,
gpu::ofp_context_t context 
)
inlineprivate

Definition at line 1376 of file map_vector_sparse.hpp.

◆ flush_on_gpu_insert()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_on_gpu_insert ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_cont_0,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_cont_1,
vector< T, Memory, layout_base, grow_p > &  vct_add_data_reord,
gpu::ofp_context_t context 
)
inlineprivate

Definition at line 1203 of file map_vector_sparse.hpp.

◆ flush_on_gpu_remove()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_on_gpu_remove ( gpu::ofp_context_t context)
inlineprivate

Definition at line 1238 of file map_vector_sparse.hpp.

◆ flush_remove()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_remove ( gpu::ofp_context_t context,
flush_type  opt = FLUSH_ON_HOST 
)
inline

merge the added element to the main data array

Parameters
optoptions

Definition at line 1811 of file map_vector_sparse.hpp.

◆ flush_v()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_v ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_cont_0,
gpu::ofp_context_t context,
flush_type  opt = FLUSH_ON_HOST,
int  i = 0 
)
inline

merge the added element to the main data array but save the insert buffer in v

Parameters
vinsert buffer
optoptions

Definition at line 1748 of file map_vector_sparse.hpp.

◆ flush_vd()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::flush_vd ( vector< T, Memory, layout_base, grow_p > &  vct_add_data_reord,
gpu::ofp_context_t context,
flush_type  opt = FLUSH_ON_HOST 
)
inline

merge the added element to the main data array but save the insert buffer in v

Parameters
vinsert buffer
optoptions

Definition at line 1772 of file map_vector_sparse.hpp.

◆ get() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::get ( Ti  id) const -> decltype(vct_data.get(id))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 1588 of file map_vector_sparse.hpp.

◆ get() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int p>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::get ( Ti  id) const -> decltype(vct_data.template get<p>(id))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 1571 of file map_vector_sparse.hpp.

◆ get_sparse()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
openfpm::sparse_index< Ti > openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::get_sparse ( Ti  id) const
inline

Get the sparse index.

Get the sparse index of the element id

Note
use get_index and get to retrieve the value index associated to the sparse index
Parameters
idElement to get
Returns
the element value requested

Definition at line 1550 of file map_vector_sparse.hpp.

◆ getBackground() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getBackground ( ) const -> decltype(vct_data.get(vct_data.size()-1))
inline

Set the background to bck (which value get must return when the value is not find)

Parameters
bck

Definition at line 1634 of file map_vector_sparse.hpp.

◆ getBackground() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int p>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getBackground ( ) const -> decltype(vct_data.template get<p>(vct_data.size()-1))
inline

Set the background to bck (which value get must return when the value is not find)

Parameters
bck

Definition at line 1624 of file map_vector_sparse.hpp.

◆ getDataBuffer() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getDataBuffer ( ) -> decltype(vct_data)&
inline

Get the data buffer.

Returns
the reference to the data buffer

Definition at line 1516 of file map_vector_sparse.hpp.

◆ getDataBuffer() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getDataBuffer ( ) const -> const decltype(vct_data)&
inline

Get the data buffer.

Returns
the reference to the data buffer

Definition at line 1534 of file map_vector_sparse.hpp.

◆ getGPUInsertBuffer()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getGPUInsertBuffer ( ) -> decltype(vct_add_data)&
inline

Get the GPU insert buffer.

Returns
the reference to the GPU insert buffer

Definition at line 1924 of file map_vector_sparse.hpp.

◆ getIndexBuffer() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getIndexBuffer ( ) -> decltype(vct_index)&
inline

Get the indices buffer.

Returns
the reference to the indices buffer

Definition at line 1507 of file map_vector_sparse.hpp.

◆ getIndexBuffer() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getIndexBuffer ( ) const -> const decltype(vct_index)&
inline

Get the indices buffer.

Returns
the reference to the indices buffer

Definition at line 1525 of file map_vector_sparse.hpp.

◆ getMappingVector()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getMappingVector ( )
inline

Return the mapping vector.

When we add new elements this vector contain the merged old elements and new elements position

For example the old vector contain

Old: 5 10 35 50 66 79 (6 elements) New: 7 44 7 9 44 (5 elements) (in order are 7 7 9 44 44)

The merged indexes are (when reordered)

5 7 7 9 10 35 44 44 50 66 79

The returned map contain 5 elements indicating the position of the reordered elements:

0 2 3 1 4 (7)(7)(9)(44)(44)

Definition at line 2081 of file map_vector_sparse.hpp.

◆ getMergeIndexMapVector()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getMergeIndexMapVector ( )
inline

Return the merge mapping vector.

When we add new elements this vector contain the merged old elements and new elements position

For example the old vector contain

Old: 5 10 35 50 66 79 (6 elements) New: 7 44 7 9 44 (5 elements) (in order are 7 7 9 44 44)

The merged indexes are (when reordered)

5 7 7 9 10 35 44 44 50 66 79

The returned map contain 5 elements indicating the position of the reordered elements:

0 6 7 8 1 2 9 10 3 4 5 (5)(7)(7)(9)(10)(35)(44)(44)(50)(66)(79)

Definition at line 2104 of file map_vector_sparse.hpp.

◆ getSegmentToMergeIndexMap() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getSegmentToMergeIndexMap ( )
inline

Definition at line 2053 of file map_vector_sparse.hpp.

◆ getSegmentToMergeIndexMap() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getSegmentToMergeIndexMap ( ) const
inline

Definition at line 2058 of file map_vector_sparse.hpp.

◆ getSegmentToOutMap() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getSegmentToOutMap ( ) -> decltype(blf.get_outputMap())
inline

Definition at line 2017 of file map_vector_sparse.hpp.

◆ getSegmentToOutMap() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::getSegmentToOutMap ( ) const -> decltype(blf.get_outputMap())
inline

Definition at line 2022 of file map_vector_sparse.hpp.

◆ hostToDevice()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int ... prp>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::hostToDevice ( )
inline

Transfer from host to device.

Template Parameters
setof parameters to transfer to device

Definition at line 1862 of file map_vector_sparse.hpp.

◆ insert() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::insert ( Ti  ele) -> decltype(vct_data.get(0))
inline

It insert an element in the sparse vector.

Parameters
eleelement id

Definition at line 1732 of file map_vector_sparse.hpp.

◆ insert() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int p>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::insert ( Ti  ele) -> decltype(vct_data.template get<p>(0))
inline

It insert an element in the sparse vector.

Template Parameters
pproperty id
Parameters
eleelement id

Definition at line 1660 of file map_vector_sparse.hpp.

◆ insertFlush() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::insertFlush ( Ti  ele,
bool &  is_new 
) -> decltype(vct_data.get(0))
inline

It insert an element in the sparse vector.

Parameters
eleelement id

Definition at line 1703 of file map_vector_sparse.hpp.

◆ insertFlush() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int p>
auto openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::insertFlush ( Ti  ele,
bool &  is_new 
) -> decltype(vct_data.template get<p>(0))
inline

It insert an element in the sparse vector.

Template Parameters
pproperty id
Parameters
eleelement id

Definition at line 1676 of file map_vector_sparse.hpp.

◆ make_continuos()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
size_t openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::make_continuos ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_nadd_index,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_cont_index,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_cont_index_map,
vector< T, Memory, layout_base, grow_p > &  vct_add_data,
vector< T, Memory, layout_base, grow_p > &  vct_add_data_cont,
gpu::ofp_context_t context 
)
inlineprivate

Definition at line 885 of file map_vector_sparse.hpp.

◆ merge_datas()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::merge_datas ( vector< T, Memory, layout_base, grow_p > &  vct_add_data_reord,
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > &  segments_new,
vector< T, Memory, layout_base, grow_p > &  vct_add_data,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_data_reord_map,
gpu::ofp_context_t context 
)
inlineprivate

Definition at line 1122 of file map_vector_sparse.hpp.

◆ merge_indexes()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<typename ... v_reduce>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::merge_indexes ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_index_sort,
vector< aggregate< Ti, Ti >, Memory, layout_base, grow_p > &  vct_add_index_unique,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_merge_index,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_merge_index_map,
gpu::ofp_context_t context 
)
inlineprivate

Merge indexes.

Parameters

Definition at line 1014 of file map_vector_sparse.hpp.

◆ preFlush()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::preFlush ( )
inline

In case we manually set the added index buffer and the add data buffer we have to call this function before flush.

Definition at line 1906 of file map_vector_sparse.hpp.

◆ private_get_vct_add_data()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< T, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_add_data ( )
inline

Definition at line 1992 of file map_vector_sparse.hpp.

◆ private_get_vct_add_index() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_add_index ( )
inline

Definition at line 1997 of file map_vector_sparse.hpp.

◆ private_get_vct_add_index() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
const vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_add_index ( ) const
inline

Definition at line 2002 of file map_vector_sparse.hpp.

◆ private_get_vct_index()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_index ( )
inline

Return the sorted vector of the indexes.

Returns
return the sorted vector of the indexes

Definition at line 1839 of file map_vector_sparse.hpp.

◆ private_get_vct_nadd_index() [1/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_nadd_index ( )
inline

Definition at line 2007 of file map_vector_sparse.hpp.

◆ private_get_vct_nadd_index() [2/2]

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
const vector< aggregate< Ti >, Memory, layout_base, grow_p > & openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::private_get_vct_nadd_index ( ) const
inline

Definition at line 2012 of file map_vector_sparse.hpp.

◆ removeUnusedBuffers()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::removeUnusedBuffers ( )
inline

Eliminate many internal temporary buffer you can use this between flushes if you get some out of memory.

Definition at line 2031 of file map_vector_sparse.hpp.

◆ reorder_indexes()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::reorder_indexes ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_cont_index,
vector< aggregate< Ti >, Memory, layout_base, grow_p > &  vct_add_cont_index_map,
vector< T, Memory, layout_base, grow_p > &  vct_add_data_reord,
vector< T, Memory, layout_base, grow_p > &  vct_add_data_cont,
gpu::ofp_context_t context 
)
inlineprivate

sort the continuos array of inserted key

Parameters
contextmodern gpu context
vct_add_cont_indexarray of indexes (unsorted), as output will be sorted
vct_add_cont_index_mapreference to the original indexes
vct_add_data_reordsorted data output
vct_add_data_contadded data in a continuos unsorted array

Definition at line 967 of file map_vector_sparse.hpp.

◆ resetBck()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::resetBck ( )
inlineprivate

Definition at line 1365 of file map_vector_sparse.hpp.

◆ resize()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::resize ( size_t  n)
inline

resize to n elements

Parameters
nelements

Definition at line 1600 of file map_vector_sparse.hpp.

◆ setBackground()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
template<unsigned int p>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::setBackground ( const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &  bck_)
inline

Definition at line 1640 of file map_vector_sparse.hpp.

◆ setGPUInsertBuffer()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::setGPUInsertBuffer ( int  nblock,
int  nslot 
)
inline

set the gpu insert buffer for every block

Parameters
nblocknumber of blocks
nslotnumber of slots free for each block

Definition at line 1892 of file map_vector_sparse.hpp.

◆ setGPURemoveBuffer()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::setGPURemoveBuffer ( int  nblock,
int  nslot 
)
inline

set the gpu remove buffer for every block

Parameters
nblocknumber of blocks
nslotnumber of slots free for each block

Definition at line 1935 of file map_vector_sparse.hpp.

◆ size()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
size_t openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::size ( )
inline

Return how many element you have in this map.

Returns
the number of elements

Definition at line 1829 of file map_vector_sparse.hpp.

◆ swap()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::swap ( vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor > &  sp)
inline

Definition at line 1980 of file map_vector_sparse.hpp.

◆ swapIndexVector()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
void openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::swapIndexVector ( vector< aggregate< Ti >, Memory, layout_base, grow_p > &  iv)
inline
Warning
After using this function to move out the vector of the indexes, this object become useless and must be destroyed
Parameters
iv

Definition at line 1613 of file map_vector_sparse.hpp.

◆ toKernel()

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector_sparse_gpu_ker< T, Ti, layout_base > openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::toKernel ( )
inline

toKernel function transform this structure into one that can be used on GPU

Returns
structure that can be used on GPU

Definition at line 1873 of file map_vector_sparse.hpp.

Field Documentation

◆ bck

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
T openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::bck
private

Definition at line 820 of file map_vector_sparse.hpp.

◆ blf

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
block_functor openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::blf
private

Definition at line 818 of file map_vector_sparse.hpp.

◆ max_ele

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
size_t openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::max_ele
private

Definition at line 826 of file map_vector_sparse.hpp.

◆ mem

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
CudaMemory openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::mem
private

Definition at line 822 of file map_vector_sparse.hpp.

◆ n_gpu_add_block_slot

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
int openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::n_gpu_add_block_slot = 0
private

Definition at line 828 of file map_vector_sparse.hpp.

◆ n_gpu_rem_block_slot

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
int openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::n_gpu_rem_block_slot = 0
private

Definition at line 829 of file map_vector_sparse.hpp.

◆ reorder_add_index_cpu

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
openfpm::vector<reorder<Ti> > openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::reorder_add_index_cpu
private

Definition at line 824 of file map_vector_sparse.hpp.

◆ segments_int

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<int,int>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::segments_int
private

Definition at line 805 of file map_vector_sparse.hpp.

◆ vct_add_data

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<T,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_data
private

Definition at line 798 of file map_vector_sparse.hpp.

◆ vct_add_data_cont

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<T,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_data_cont
private

Definition at line 803 of file map_vector_sparse.hpp.

◆ vct_add_data_reord

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<T,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_data_reord
private

Definition at line 799 of file map_vector_sparse.hpp.

◆ vct_add_data_unique

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<T,Memory,layout_base,grow_p,impl> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_data_unique
private

Definition at line 807 of file map_vector_sparse.hpp.

◆ vct_add_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_index
private

Definition at line 794 of file map_vector_sparse.hpp.

◆ vct_add_index_cont_0

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_index_cont_0
private

Definition at line 801 of file map_vector_sparse.hpp.

◆ vct_add_index_cont_1

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_index_cont_1
private

Definition at line 802 of file map_vector_sparse.hpp.

◆ vct_add_index_unique

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti,Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_add_index_unique
private

Definition at line 804 of file map_vector_sparse.hpp.

◆ vct_data

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<T,Memory,layout_base,grow_p,impl> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_data
private

Definition at line 791 of file map_vector_sparse.hpp.

◆ vct_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index
private

Definition at line 790 of file map_vector_sparse.hpp.

◆ vct_index_dtmp

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti,Ti,Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index_dtmp
private

Definition at line 813 of file map_vector_sparse.hpp.

◆ vct_index_tmp

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index_tmp
private

Definition at line 810 of file map_vector_sparse.hpp.

◆ vct_index_tmp2

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index_tmp2
private

Definition at line 811 of file map_vector_sparse.hpp.

◆ vct_index_tmp3

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index_tmp3
private

Definition at line 812 of file map_vector_sparse.hpp.

◆ vct_index_tmp4

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_index_tmp4
private

Definition at line 809 of file map_vector_sparse.hpp.

◆ vct_m_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_m_index
private

Definition at line 792 of file map_vector_sparse.hpp.

◆ vct_nadd_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_nadd_index
private

Definition at line 796 of file map_vector_sparse.hpp.

◆ vct_nrem_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_nrem_index
private

Definition at line 797 of file map_vector_sparse.hpp.

◆ vct_rem_index

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_rem_index
private

Definition at line 795 of file map_vector_sparse.hpp.

◆ vct_segment_index_map

template<typename T , typename Ti = long int, typename Memory = HeapMemory, typename layout = typename memory_traits_lin<T>::type, template< typename > class layout_base = memory_traits_lin, typename grow_p = grow_policy_double, unsigned int impl = vect_isel<T>::value, unsigned int impl2 = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor>
vector<aggregate<Ti>,Memory,layout_base,grow_p> openfpm::vector_sparse< T, Ti, Memory, layout, layout_base, grow_p, impl, impl2, block_functor >::vct_segment_index_map
private

Definition at line 816 of file map_vector_sparse.hpp.


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