Exemple #1
0
inline int GridInit( int bHandle, const AbstractDistMatrix<scalarType>& A )
{
    if( A.ColDist() != MC || A.RowDist() != MR )
        LogicError
        ("Only (MC,MR) distributions are currently supported with ScaLAPACK");
    const int context =
      GridInit
      ( bHandle, A.Grid().Order()==COLUMN_MAJOR, A.ColStride(), A.RowStride() );
    DEBUG_ONLY(
      if( A.ColStride() != GridHeight(context) )
          LogicError("Grid height did not match BLACS");
      if( A.RowStride() != GridWidth(context) )
          LogicError("Grid width did not match BLACS");
      if( A.ColRank() != GridRow(context) )
          LogicError("Grid row did not match BLACS");
      if( A.RowRank() != GridCol(context) )
          LogicError("Grid col did not match BLACS");
    )
    return context;
Exemple #2
0
//------------------------------------------------------------------------------------------------------------------------------------------------------
void FM_Draw(void)
{
    if (gBF.needRedrawFileManager == 0)
    {
        return;
    }

    ModeFSMC mode = FSMC_GetMode();
    //FSMC_SetMode(ModeFSMC_Display);

    int left = 1;
    int top = 1;
    int width = 297;
    int left2col = width / 2;

    if (gBF.needRedrawFileManager == 1)
    {
        Painter_BeginScene(gColorBack);
        Menu_Draw();
        Painter_DrawRectangleC(0, 0, width, 239, gColorFill);
        Painter_FillRegionC(left, top, GridWidth() - 2, GridFullHeight() - 2, gColorBack);
        FDrive_GetNumDirsAndFiles(currentDir, &numDirs, &numFiles);
        DrawNameCurrentDir(left, top + 2);
        Painter_DrawVLineC(left2col, top + 16, 239, gColorFill);
        Painter_DrawHLine(top + 15, 0, width);
    }

    if (gBF.needRedrawFileManager != 3)
    {
        DrawDirs(left + 2, top + 18);
    }

    if (gBF.needRedrawFileManager != 2)
    {
        DrawFiles(left2col + 3, top + 18);
    }

    Painter_EndScene();

    gBF.needRedrawFileManager = 0;

    FSMC_SetMode(mode);
}
Exemple #3
0
void FM_Draw()
{
    if (gBF.needRedrawFileManager == 0)
    {
        return;
    }

    int left = 1;
    int top = 1;
    int width = 297;
    int left2col = width / 2;

    if (gBF.needRedrawFileManager == 1)
    {
        Painter_BeginScene(COLOR_BACK);
        Menu_Draw();
        Painter_DrawRectangleC(0, 0, width, 239, COLOR_FILL);
        Painter_FillRegionC(left, top, GridWidth() - 2, GridFullHeight() - 2, COLOR_BACK);
        FDrive_GetNumDirsAndFiles(currentDir, &numDirs, &numFiles);
        DrawNameCurrentDir(left, top + 2);
        Painter_DrawVLineC(left2col, top + 16, 239, COLOR_FILL);
        Painter_DrawHLine(top + 15, 0, width);
    }

    if (gBF.needRedrawFileManager != 3)
    {
        DrawDirs(left + 2, top + 18);
    }

    if (gBF.needRedrawFileManager != 2)
    {
        DrawFiles(left2col + 3, top + 18);
    }

    Painter_EndScene();

    //Painter_SaveScreenToFlashDrive();

    gBF.needRedrawFileManager = 0;
}