Skylark (Sketching Library)
0.1
|
#include <vector>
#include <boost/mpi.hpp>
#include <boost/test/minimal.hpp>
#include "../../utility/distributions.hpp"
#include "../../base/context.hpp"
#include "../../sketch/hash_transform.hpp"
#include "../../base/sparse_matrix.hpp"
Go to the source code of this file.
Classes | |
struct | Dummy_t< InputMatrixType, OutputMatrixType > |
Defines | |
#define | SKYLARK_SKETCH_HPP 1 |
Typedefs | |
typedef FullyDistVec< size_t, double > | mpi_vector_t |
typedef SpDCCols< size_t, double > | col_t |
typedef SpParMat< size_t, double, col_t > | DistMatrixType |
typedef PlusTimesSRing< double, double > | PTDD |
typedef skylark::base::sparse_matrix_t < double > | LocalMatrixType |
Functions | |
template<typename sketch_t > | |
void | compute_sketch_matrix (sketch_t sketch, const DistMatrixType &A, DistMatrixType &result) |
void | compare_result (size_t rank, DistMatrixType &expected_A, elem::DistMatrix< double, elem::STAR, elem::STAR > &result) |
int | test_main (int argc, char *argv[]) |
#define SKYLARK_SKETCH_HPP 1 |
This test ensures that the sketch application (for mixed: CombBLAS -> Elemental matrices) is done correctly (on-the-fly matrix multiplication in the code is compared to true matrix multiplication). This test builds on the following assumptions:
Definition at line 19 of file SparseSketchApplyMixedTest.cpp.
typedef SpDCCols<size_t, double> col_t |
Definition at line 28 of file SparseSketchApplyMixedTest.cpp.
typedef SpParMat<size_t, double, col_t> DistMatrixType |
Definition at line 29 of file SparseSketchApplyMixedTest.cpp.
typedef skylark::base::sparse_matrix_t<double> LocalMatrixType |
Definition at line 31 of file SparseSketchApplyMixedTest.cpp.
typedef FullyDistVec<size_t, double> mpi_vector_t |
Definition at line 27 of file SparseSketchApplyMixedTest.cpp.
typedef PlusTimesSRing<double, double> PTDD |
Definition at line 30 of file SparseSketchApplyMixedTest.cpp.
void compare_result | ( | size_t | rank, |
DistMatrixType & | expected_A, | ||
elem::DistMatrix< double, elem::STAR, elem::STAR > & | result | ||
) |
Definition at line 81 of file SparseSketchApplyMixedTest.cpp.
Referenced by test_main().
void compute_sketch_matrix | ( | sketch_t | sketch, |
const DistMatrixType & | A, | ||
DistMatrixType & | result | ||
) |
Definition at line 59 of file SparseSketchApplyMixedTest.cpp.
int test_main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 112 of file SparseSketchApplyMixedTest.cpp.
References skylark::sketch::hash_transform_t< InputMatrixType, OutputMatrixType, boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::apply(), compare_result(), compute_sketch_matrix(), skylark::base::Gemm(), Dummy_t< InputMatrixType, OutputMatrixType >::getRowIdx(), Dummy_t< InputMatrixType, OutputMatrixType >::getRowValues(), m, and n.