ViennaCL - The Vienna Computing Library: tests/src/svd.cpp File Reference

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
svd.cpp File Reference
`#include <stdexcept>`
`#include <iostream>`
`#include <string>`
`#include <vector>`
`#include <cmath>`
`#include "viennacl/matrix.hpp"`
`#include "viennacl/linalg/prod.hpp"`
`#include "viennacl/linalg/svd.hpp"`
`#include "viennacl/tools/timer.hpp"`

Go to the source code of this file.

## Functions
void | read_matrix_size (std::fstream &f, std::size_t &sz1, std::size_t &sz2)
template<typename ScalarType >
void | read_matrix_body (std::fstream &f, viennacl::matrix< ScalarType > &A)
template<typename ScalarType >
void | read_vector_body (std::fstream &f, std::vector< ScalarType > &v)
template<typename ScalarType >
void | random_fill (std::vector< ScalarType > &in)
template<typename ScalarType >
bool | check_bidiag (viennacl::matrix< ScalarType > &A)
template<typename ScalarType >
ScalarType | matrix_compare (viennacl::matrix< ScalarType > &res, viennacl::matrix< ScalarType > &ref)
template<typename ScalarType >
ScalarType | sigmas_compare (viennacl::matrix< ScalarType > &res, std::vector< ScalarType > &ref)
template<typename ScalarType >
void | test_svd (const std::string &fn, ScalarType EPS)
template<typename ScalarType >
void | time_svd (std::size_t sz1, std::size_t sz2)
template<typename ScalarType >
int | test (ScalarType epsilon)
int | main ()

## Detailed Description

Tests the singular value decomposition.

Test:
  Tests the singular value decomposition.

Definition in file svd.cpp.

## Function Documentation

template<typename ScalarType >

bool check_bidiag | ( | viennacl::matrix< ScalarType > & | A | ) |

Definition at line 93 of file svd.cpp.

int main | ( |  | ) |

Definition at line 262 of file svd.cpp.

template<typename ScalarType >

ScalarType matrix_compare | ( | viennacl::matrix< ScalarType > & | res,
|  | viennacl::matrix< ScalarType > & | ref
| ) |  |

Definition at line 117 of file svd.cpp.

template<typename ScalarType >

void random_fill | ( | std::vector< ScalarType > & | in | ) |

Definition at line 85 of file svd.cpp.

template<typename ScalarType >

void read_matrix_body | ( | std::fstream & | f,
|  | viennacl::matrix< ScalarType > & | A
| ) |  |

Definition at line 48 of file svd.cpp.

void read_matrix_size | ( | std::fstream & | f,
|  | std::size_t & | sz1,
|  | std::size_t & | sz2
| ) |  |
| inline

Definition at line 38 of file svd.cpp.

template<typename ScalarType >

void read_vector_body | ( | std::fstream & | f,
|  | std::vector< ScalarType > & | v
| ) |  |

Definition at line 70 of file svd.cpp.

template<typename ScalarType >

ScalarType sigmas_compare | ( | viennacl::matrix< ScalarType > & | res,
|  | std::vector< ScalarType > & | ref
| ) |  |

Definition at line 140 of file svd.cpp.

template<typename ScalarType >

int test | ( | ScalarType | epsilon | ) |

Definition at line 241 of file svd.cpp.

template<typename ScalarType >

void test_svd | ( | const std::string & | fn,
|  | ScalarType | EPS
| ) |  |

Definition at line 164 of file svd.cpp.

template<typename ScalarType >

void time_svd | ( | std::size_t | sz1,
|  | std::size_t | sz2
| ) |  |

Definition at line 219 of file svd.cpp.