Пример #1
0
void main()
{
    int a[LEN][LEN] /*=
    {
        { 1,0,0,0,0,0,0,0,0,0 },
        { 0,1,0,0,0,0,0,0,0,0 },
        { 0,0,1,0,0,0,0,0,0,0 },
        { 0,0,0,1,0,0,0,0,0,0 },
        { 0,0,0,0,1,0,0,0,0,0 },
        { 0,0,0,0,0,1,0,0,0,0 },
        { 0,0,0,0,0,0,1,0,0,0 },
        { 0,0,0,0,0,0,0,1,0,0 },
        { 0,0,0,0,0,0,0,0,1,0 },
        { 0,0,0,0,0,0,0,0,0,1 }
    }*/;
    initR(a);
    srand((unsigned)time(NULL));
    int counter = 0;
    while( identity_matrix(&a[LEN][LEN],LEN) != 1 && counter < 2e16+1){
        counter++;
 //       printM(a);
        initR(a);
    }
    printM(a);
    printf("counter = %d\n",counter);
    printf("%d\n",identity_matrix(&a[LEN][LEN],LEN));
}
Пример #2
0
int r_setup(){

  int initRes;
  initRes=initR(N_R_ARGS, Rargv);
  
  return initRes;
}
Пример #3
0
FuncInstr::FuncInstr( uint32 bytes, uint32 PC) : instr(bytes), PC(PC)
{
    src1 = src2 = dst = REG_NUM_ZERO;
    complete = false;
    initFormat(); 
    switch ( format)
    {
        case FORMAT_R:
            initR();
            break;
        case FORMAT_I:
            initI();
            break;
        case FORMAT_J:
            initJ();
            break;
        case FORMAT_UNKNOWN:
            initUnknown();
            break;
    }
    new_PC = PC + 4;
}
Пример #4
0
void TFT::begin() {
  initR(INITR_REDTAB);
  setRotation(1);
}