Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.87 KB

LayoutMappingPolicy.md

File metadata and controls

62 lines (46 loc) · 1.87 KB

LayoutMappingPolicy

  • cpp23[meta cpp]
  • mdspan[meta header]
  • named requirement[meta id-type]
  • [meta namespace]

概要

LayoutMappingPolicyは、多次元配列ビューmdspanにおいて多次元インデクスから参照先メモリブロック位置へと変換するレイアウトマッピングを定めるクラスが満たすべき要件である。

LayoutMappingPolicyを満たすユーザ定義layout_customポリシークラスは、下記の構造で定義される。

// レイアウトマッピングポリシー
struct layout_custom {
  // レイアウトマッピング
  template<class Extents>
  class mapping {
  public:
    using layout_type = layout_custom;
    using extent_type = Extents;
    // ...
  };
};
  • Extents[link extents.md]

要件

LayoutMappingPolicyを満たす型MP

  • extentsの特殊化Eに対してMP::mapping<E>が有効であり、かつ
  • その型Xレイアウトマッピング要件を満たし、かつ
  • メンバ型X::layout_typeが型MPを表しており、かつ
  • メンバ型X::extent_typeが型Eを表すこと。

LayoutMappingPolicyに該当する型

バージョン

言語

  • C++23

関連項目

参照