當前位置: 首頁>>代碼示例>>C++>>正文


C++ DefaultGrid函數代碼示例

本文整理匯總了C++中DefaultGrid函數的典型用法代碼示例。如果您正苦於以下問題:C++ DefaultGrid函數的具體用法?C++ DefaultGrid怎麽用?C++ DefaultGrid使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DefaultGrid函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: DefaultGrid

namespace map {

DefaultGrid const GridRepo::mDefault = DefaultGrid();

GridRepo::GridRepo()
    : Repository<IGrid>( mDefault )
{
    int32_t id = AutoId( "absolute" );
    mElements.insert( id, new AbsoluteGrid( AutoId( "absolute" ) ) );
    id = AutoId( "matrix" );
    mElements.insert( id, new MatrixGrid( AutoId( "matrix" ) ) );
}


void DefaultGrid::Update( double DeltaTime )
{

}

DefaultGrid::DefaultGrid()
    : IGrid( -1 )
{

}

} // namespace map
開發者ID:HalalUr,項目名稱:Reaping2,代碼行數:26,代碼來源:grid_repo.cpp

示例2: DistMatrix

// entire process grid if and only if the dimensions of the process grid
// are coprime.
template<typename T>
class DistMatrix<T,STAR,MD> : public AbstractDistMatrix<T>
{
public:
    // Typedefs
    // ========
    typedef AbstractDistMatrix<T> absType;
    typedef DistMatrix<T,STAR,MD> type;

    // Constructors and destructors
    // ============================

    // Create a 0 x 0 distributed matrix
    DistMatrix( const El::Grid& g=DefaultGrid(), int root=0 );
    // Create a height x width distributed matrix
    DistMatrix
    ( Int height, Int width, const El::Grid& g=DefaultGrid(), int root=0 );
    // Create a copy of distributed matrix A
    DistMatrix( const type& A );
    DistMatrix( const absType& A );
    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );
    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );
    // Move constructor
    DistMatrix( type&& A ) EL_NOEXCEPT;
    ~DistMatrix();

    DistMatrix<T,STAR,MD>* Construct
    ( const El::Grid& g, int root ) const override;
    DistMatrix<T,MD,STAR>* ConstructTranspose
開發者ID:jakebolewski,項目名稱:Elemental,代碼行數:31,代碼來源:STAR_MD.hpp

示例3: DistMatrix

#ifndef ELEM_CORE_DISTMATRIX_VC_STAR_DECL_HPP
#define ELEM_CORE_DISTMATRIX_VC_STAR_DECL_HPP

namespace elem {

// Partial specialization to A[VC,* ].
//
// The columns of these distributed matrices are spread throughout the 
// process grid in a column-major fashion, while the rows are not 
// distributed.
template<typename T>
class DistMatrix<T,VC,STAR> : public AbstractDistMatrix<T>
{
public:
    // Create a 0 x 0 distributed matrix
    DistMatrix( const elem::Grid& g=DefaultGrid() );

    // Create a height x width distributed matrix
    DistMatrix( Int height, Int width, const elem::Grid& g=DefaultGrid() );

    // Create a height x width distributed matrix with specified alignments
    DistMatrix
    ( Int height, Int width, Int colAlignment, const elem::Grid& g );

    // Create a height x width distributed matrix with specified alignments
    // and leading dimension
    DistMatrix
    ( Int height, Int width, 
      Int colAlignment, Int ldim, const elem::Grid& g );

    // View a constant distributed matrix's buffer
開發者ID:khalid-hasanov,項目名稱:Elemental,代碼行數:31,代碼來源:vc_star.hpp

示例4: BASE

    void UpdateRealPartOfDiagonal
    ( BASE(T) alpha, const DistMatrix<BASE(T),UDiag,VDiag>& d, Int offset=0 );
    void UpdateImagPartOfDiagonal
    ( BASE(T) alpha, const DistMatrix<BASE(T),UDiag,VDiag>& d, Int offset=0 );
#endif // ifndef SWIG

protected:

    // Private constructors
    // ====================

    // Inherited constructors are part of C++11 but not yet widely supported.
    //using AbstractDistMatrix<T>::AbstractDistMatrix;

    // Create a 0 x 0 distributed matrix
    GeneralDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );

    // Diagonal helper routines
    // ========================
#ifndef SWIG
    template<typename S,class Function>
    void GetDiagonalHelper
    ( DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) const;
    template<typename S,class Function>
    void SetDiagonalHelper
    ( const DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func );
#endif // ifndef SWIG

    // Friend declarations
    // ===================
#ifndef SWIG
開發者ID:kyle-jhchen,項目名稱:Elemental,代碼行數:31,代碼來源:general.hpp

示例5: AbstractDistMatrix

class AbstractDistMatrix
{
public:
    // Typedefs
    // ========
    typedef AbstractDistMatrix<T> type;

    // Constructors and destructors
    // ============================
    // Move constructor
    AbstractDistMatrix( type&& A ) EL_NOEXCEPT;

    virtual ~AbstractDistMatrix();

    virtual AbstractDistMatrix<T>* Construct
    ( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
    virtual AbstractDistMatrix<T>* ConstructTranspose
    ( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
    virtual AbstractDistMatrix<T>* ConstructDiagonal
    ( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
    // TODO: ConstructPartialCol and friends?

    // Assignment and reconfiguration
    // ==============================
    // Move assignment
    type& operator=( type&& A );

    void Empty();
    void EmptyData();
    void SetGrid( const El::Grid& grid );
    void Resize( Int height, Int width );
開發者ID:v4m4,項目名稱:Elemental,代碼行數:31,代碼來源:Abstract.hpp

示例6: GlobalCol

    Int  GlobalCol( Int jLoc )   const override EL_NO_EXCEPT;

    // Diagonal manipulation
    // =====================
    bool DiagonalAlignedWith
    ( const El::DistData& d, Int offset=0 ) const override EL_NO_EXCEPT;
    bool DiagonalAlignedWith
    ( const El::ElementalData& d, Int offset=0 ) const EL_NO_EXCEPT;
    int DiagonalRoot( Int offset=0 ) const override EL_NO_EXCEPT;
    int DiagonalAlign( Int offset=0 ) const override EL_NO_EXCEPT;

protected:
    // Protected constructors
    // ======================
    // Create a 0 x 0 distributed matrix
    ElementalMatrix( const El::Grid& g=DefaultGrid(), int root=0 );

private:
    // Exchange metadata with another matrix
    // =====================================
    void ShallowSwap( type& A );

    template<typename S,Dist J,Dist K,DistWrap wrap> friend class DistMatrix;
};

template<typename T>
void AssertConforming1x2
( const ElementalMatrix<T>& AL, const ElementalMatrix<T>& AR );

template<typename T>
void AssertConforming2x1
開發者ID:andreasnoack,項目名稱:Elemental,代碼行數:31,代碼來源:Element.hpp

示例7: DiagonalRoot

    ( const El::BlockCyclicData& d, Int offset=0 ) const;
    int DiagonalRoot( Int offset=0 ) const;
    int DiagonalAlign( Int offset=0 ) const;

protected:
    // Member variables
    // ================

    // Process grid and distribution metadata
    // --------------------------------------
    Int blockHeight_, blockWidth_;
    Int colCut_,   rowCut_;

    // Private constructors
    // ====================
    BlockCyclicMatrix( const El::Grid& g=DefaultGrid(),  int root=0 );
    BlockCyclicMatrix
    ( const El::Grid& g, Int blockHeight, Int blockWidth, int root=0 );

private:
    Int NewLocalHeight( Int height ) const;
    Int NewLocalWidth( Int width ) const;

    Int NewLocalHeight_( Int height ) const EL_NO_EXCEPT;
    Int NewLocalWidth_( Int width ) const EL_NO_EXCEPT;

    // Exchange metadata with another matrix
    // =====================================
    void ShallowSwap( type& A );

    template<typename S,Dist J,Dist K,DistWrap wrap> friend class DistMatrix;
開發者ID:bluehope,項目名稱:Elemental,代碼行數:31,代碼來源:BlockCyclic.hpp

示例8:

 DistMatrix<T,MD,STAR>* ConstructDiagonal
 ( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
開發者ID:arbenson,項目名稱:Elemental,代碼行數:2,代碼來源:MC_MR.hpp

示例9: BlockDistMatrix

{
public:
    // Typedefs
    // ========
    typedef AbstractBlockDistMatrix<T> absType;
    typedef GeneralBlockDistMatrix<T,MC,MR> genType;
    typedef BlockDistMatrix<T,MC,MR> type;

    // Constructors and destructors
    // ============================

    // Inherited constructors are part of C++11 but not yet widely supported.
    //using GeneralBlockDistMatrix<T,MC,MR>::GeneralBlockDistMatrix;

    // Create a 0 x 0 distributed matrix with default (and unpinned) block size
    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );
    // Create a 0 x 0 distributed matrix with fixed block size
    BlockDistMatrix
    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );
    // Create a height x width distributed matrix with default block size
    BlockDistMatrix
    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );
    // Create a height x width distributed matrix with fixed block size
    BlockDistMatrix
    ( Int height, Int width, const elem::Grid& g,
      Int blockHeight, Int blockWidth, Int root=0 );
    // Create a copy of distributed matrix A (redistributing if necessary)
    BlockDistMatrix( const type& A );
    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );
    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );
    // Move constructor
開發者ID:SamKChang,項目名稱:madness,代碼行數:31,代碼來源:MC_MR.hpp

示例10:

 BlockDistMatrix<T,VC,STAR>* Construct
 ( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
開發者ID:arbenson,項目名稱:Elemental,代碼行數:2,代碼來源:VC_STAR.hpp

示例11:

 BlockDistMatrix<T,STAR,VR>* ConstructTranspose
 ( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
開發者ID:arbenson,項目名稱:Elemental,代碼行數:2,代碼來源:VR_STAR.hpp


注:本文中的DefaultGrid函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。