OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lto/] [20091004-2_0.C] - Blame information for rev 751

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-lto-do link }
2
// { dg-require-effective-target fpic }
3
// { dg-lto-options {{-fPIC -O -flto}} }
4
 
5
typedef double Real;
6
class Vector {
7
    int dimen;
8
    Real* val;
9
public:
10
    Vector& operator=(const Vector& vec);
11
    Vector(int p_dimen, Real *p_val)
12
        : dimen(p_dimen), val(p_val)    { }
13
    int dim() const;
14
};
15
class DVector : public Vector {
16
public:
17
    void reDim(int newdim);
18
    explicit DVector(const Vector& old);
19
    DVector& operator=(const Vector& vec)    {
20
        reDim(vec.dim());
21
        Vector::operator=(vec);
22
    }
23
};
24
class SLUFactor  {
25
    DVector vec;
26
    void solveRight (Vector& x, const Vector& b);
27
};
28
void SLUFactor::solveRight (Vector& x, const Vector& b) {
29
    vec = b;
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.