www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12727] New: GIT HEAD : DMD hangs up

https://issues.dlang.org/show_bug.cgi?id=12727

          Issue ID: 12727
           Summary: GIT HEAD : DMD hangs up
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

template IndexTuple(int e, int s = 0, T...) {
    static if(s == e)
        alias IndexTuple = T;
        else
            alias IndexTuple = IndexTuple!(e);
}

struct LUP(T, int N) {
    alias MT = Matrix!(T, N);
    MT lu ;
}

struct Matrix(T, uint N = M) {


    union {
        T[]A ;
    }


        pure decomposeLUP() {
            auto r = LUP!(T, N);

            foreach(j; IndexTuple!(1)) {
                foreach(i; IndexTuple!(N))                     r.lu[i][j] /=
r.lu[j][j];

                    foreach(k; IndexTuple!(N, j + 1))
                        r.lu[i][k] -= r.lu[i][j] * r.lu[j][k];
            }

        }

}

alias Vector(T, uint M) = Matrix!(T, M);
alias Vector3 = Vector!(float, 3);

Dustmited should give compile error.

--
May 10 2014