18 template<
unsigned int Precision>
20 template<
unsigned int Precision>
25 template<
unsigned int Precision>
35 template<
unsigned int Precision>
44 template<
unsigned int Precision>
46 template<
unsigned int Precision>
57 template<
unsigned int Precision>
156 for(
i=0;
i<=
m-1;
i++)
158 for(
j=0;
j<=n-1;
j++)
194 printf(
"TESTING SVD DECOMPOSITION\n");
195 printf(
"SVD decomposition error: %5.3le\n",
197 printf(
"SVD orthogonality error: %5.3le\n",
199 printf(
"SVD with different parameters error: %5.3le\n",
201 printf(
"Singular values order: ");
210 printf(
"Always converged: ");
218 printf(
"Fail ratio: %5.3lf\n",
221 printf(
"Threshold: %5.3le\n",
238 template<
unsigned int Precision>
248 for(
i=0;
i<=
m-1;
i++)
250 for(
j=0;
j<=n-1;
j++)
265 template<
unsigned int Precision>
290 for(
i=0;
i<=
m-1;
i++)
292 for(
j=0;
j<=n-1;
j++)
315 locerr = amp::maximum<Precision>(
locerr, amp::abs<Precision>(
sm));
319 locerr = amp::maximum<Precision>(
locerr, amp::abs<Precision>(
sm-1));
324 locerr = amp::maximum<Precision>(
locerr, amp::abs<Precision>(
sm));
328 locerr = amp::maximum<Precision>(
locerr, amp::abs<Precision>(
sm-1));
347 template<
unsigned int Precision>
379 if( !svd::rmatrixsvd<Precision>(a,
m, n, 2, 2, 2,
w, u,
vt) )
420 for(
i=0;
i<=
m-1;
i++)
429 for(
j=0;
j<=n-1;
j++)
452 template<
unsigned int Precision>
466 template<
unsigned int Precision>
static const ampf getAlgoPascalEpsilon()
static const ampf getRandom()
void setbounds(int iLow1, int iHigh1, int iLow2, int iHigh2)
const Variable & v
< [in] a sqrfree bivariate poly
T vdotproduct(const_raw_vector< T > v1, const_raw_vector< T > v2)
int minint(int m1, int m2)
void fillsparsea(ap::template_2d_array< amp::ampf< Precision > > &a, int m, int n, amp::ampf< Precision > sparcity)
bool testsvd(bool silent)
void getsvderror(const ap::template_2d_array< amp::ampf< Precision > > &a, int m, int n, const ap::template_2d_array< amp::ampf< Precision > > &u, const ap::template_1d_array< amp::ampf< Precision > > &w, const ap::template_2d_array< amp::ampf< Precision > > &vt, amp::ampf< Precision > &materr, amp::ampf< Precision > &orterr, bool &wsorted)
bool testsvdunit_test_silent()
void testsvdproblem(const ap::template_2d_array< amp::ampf< Precision > > &a, int m, int n, amp::ampf< Precision > &materr, amp::ampf< Precision > &orterr, amp::ampf< Precision > &othererr, bool &wsorted, bool &wfailed)