GemaCoreLib
The GeMA Core library
Functions
gmMergeVectors.h File Reference

Definition of a set of functions for merging sorted vectors. More...

#include "gmCoreConfig.h"
#include "gmSparseMatrixTripletData.h"
#include <QVector>
Include dependency graph for gmMergeVectors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class DataT >
GMC_API_EXPORT void GmMergeKVectors (const QVector< DataT * > &vectors, const QVector< size_t > &sizes, DataT *output)
 Merges a set of "k" ordered vectors whose pointers and sizes are given by vectors and sizes, storing the merged data in the given output vector with size equal to the sum of the input vector sizes. More...
 
void GmUnsignedMergeKVectors (const QVector< unsigned * > &vectors, const QVector< size_t > &sizes, unsigned *output)
 Merges a set of "k" ordered vectors whose pointers and sizes are given by vectors and sizes, storing the merged data in the given output vector with size equal to the sum of the input vector sizes.
 
template<GmSparseMatrixLayoutTypes T>
void GmTripletMergeKVectors (const QVector< GmSparseMatrixTripletData< T > * > &vectors, const QVector< size_t > &sizes, GmSparseMatrixTripletData< T > *output)
 Overload of GmUnsignedMergeKVectors() for triplet data.
 
template void GmTripletMergeKVectors< GM_CSR_SPARSE_FORMAT > (const QVector< GmSparseMatrixTripletData< GM_CSR_SPARSE_FORMAT > * > &vectors, const QVector< size_t > &sizes, GmSparseMatrixTripletData< GM_CSR_SPARSE_FORMAT > *output)
 
template void GmTripletMergeKVectors< GM_CSC_SPARSE_FORMAT > (const QVector< GmSparseMatrixTripletData< GM_CSC_SPARSE_FORMAT > * > &vectors, const QVector< size_t > &sizes, GmSparseMatrixTripletData< GM_CSC_SPARSE_FORMAT > *output)
 

Detailed Description

Definition of a set of functions for merging sorted vectors.

Author
Carlos Augusto Teixeira Mendes
Date
april, 2020

Function Documentation

◆ GmMergeKVectors()

template<class DataT >
GMC_API_EXPORT void GmMergeKVectors ( const QVector< DataT * > &  vectors,
const QVector< size_t > &  sizes,
DataT *  output 
)

Merges a set of "k" ordered vectors whose pointers and sizes are given by vectors and sizes, storing the merged data in the given output vector with size equal to the sum of the input vector sizes.

Requires the DataT type to implement the < operator