sparse_policy.h
Go to the documentation of this file.
1 /*
2  * This file is a part of TiledArray.
3  * Copyright (C) 2013 Virginia Tech
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Justus Calvin
19  * Department of Chemistry, Virginia Tech
20  *
21  * sparse_array.h
22  * Jul 9, 2013
23  *
24  */
25 
26 #ifndef TILEDARRAY_SPARSE_ARRAY_H__INCLUDED
27 #define TILEDARRAY_SPARSE_ARRAY_H__INCLUDED
28 
31 #include <TiledArray/tiled_range.h>
32 
33 namespace TiledArray {
34 
35 class SparsePolicy {
36  public:
44 
46 
50  static std::shared_ptr<pmap_interface> default_pmap(World& world,
51  const std::size_t size) {
52  return std::make_shared<default_pmap_type>(world, size);
53  }
54 
55 }; // class SparsePolicy
56 
57 } // namespace TiledArray
58 
59 #endif // TILEDARRAY_SPARSE_ARRAY_H__INCLUDED
TiledArray::Pmap pmap_interface
Definition: sparse_policy.h:42
trange_type::range_type range_type
Definition: sparse_policy.h:38
TiledArray::detail::BlockedPmap default_pmap_type
Definition: sparse_policy.h:43
TA_1INDEX_TYPE index1_type
Definition: range.h:49
Range data of a tiled array.
Definition: tiled_range.h:32
range_type::index1_type index1_type
Definition: sparse_policy.h:39
static std::shared_ptr< pmap_interface > default_pmap(World &world, const std::size_t size)
Create a default process map.
Definition: sparse_policy.h:50
TiledArray::SparseShape< float > shape_type
Definition: sparse_policy.h:41
range_type::ordinal_type ordinal_type
Definition: sparse_policy.h:40
A blocked process map.
Definition: blocked_pmap.h:38
Process map.
Definition: pmap.h:55
Frobenius-norm-based sparse shape.
Definition: sparse_shape.h:74
TiledArray::TiledRange trange_type
Definition: sparse_policy.h:37
std::size_t ordinal_type
Ordinal type, to conform to TWG spec.
Definition: range.h:59
A (hyperrectangular) interval on , space of integer -indices.
Definition: range.h:46