/usr/include/TiledArray/dense_shape.h is in libtiledarray-dev 0.6.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | /*
* This file is a part of TiledArray.
* Copyright (C) 2013 Virginia Tech
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Justus Calvin
* Department of Chemistry, Virginia Tech
*
* dense_shape.h
* Jul 9, 2013
*
*/
#ifndef TILEDARRAY_DENSE_SHAPE_H__INCLUDED
#define TILEDARRAY_DENSE_SHAPE_H__INCLUDED
#include <TiledArray/type_traits.h>
namespace madness {
class World;
} // namespace
namespace TiledArray {
// Forward declarations
namespace expressions {
class VariableList;
} // namespace expressions
namespace math {
class GemmHelper;
} // namespace math
class Range;
class Permutation;
using madness::World;
/// Dense shape of an array
/// Since all tiles are present in dense arrays, this shape has no data and
/// and all checks return their logical result. The hope is that the compiler
/// will optimize branches that use these checks.
class DenseShape {
public:
// There is no data in DenseShape so the compiler generated constructors,
// assignment operator, and destructor are OK.
/// Collective initialization of a shape
/// No operation since there is no data.
static void collective_init(World&) { }
/// Validate shape range
/// \return \c true when range matches the range of this shape
static constexpr bool validate(const Range&) { return true; }
/// Check that a tile is zero
/// \tparam Index The type of the index
/// \return false
template <typename Index>
static constexpr bool is_zero(const Index&) { return false; }
/// Check density
/// \return true
static constexpr bool is_dense() { return true; }
/// Sparsity fraction
/// \return The fraction of tiles that are zero tiles.
static constexpr float sparsity() { return 0.0f; }
/// Check if the shape is empty (uninitialized)
/// \return Always \c false
static constexpr bool empty() { return false; }
DenseShape mask(const DenseShape &) const {
return DenseShape{};
};
template <typename Index>
static DenseShape update_block(const Index&, const Index&, const DenseShape&)
{ return DenseShape(); }
template <typename Index>
static DenseShape block(const Index&, const Index&) { return DenseShape(); }
template <typename Index, typename Scalar,
typename std::enable_if<detail::is_numeric<Scalar>::value>::type* = nullptr>
static DenseShape block(const Index&, const Index&, const Scalar)
{ return DenseShape(); }
template <typename Index>
static DenseShape block(const Index&, const Index&, const Permutation&)
{ return DenseShape(); }
template <typename Index, typename Scalar>
static DenseShape block(const Index&, const Index&, const Scalar, const Permutation&)
{ return DenseShape(); }
static DenseShape perm(const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape scale(const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape scale(const Scalar, const Permutation&) { return DenseShape(); }
static DenseShape add(const DenseShape&) { return DenseShape(); }
static DenseShape add(const DenseShape&, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape add(const DenseShape&, const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape add(const DenseShape&, const Scalar, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape add(const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape add(const Scalar, const Permutation&) { return DenseShape(); }
static DenseShape subt(const DenseShape&) { return DenseShape(); }
static DenseShape subt(const DenseShape&, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape subt(const DenseShape&, const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape subt(const DenseShape&, const Scalar, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape subt(const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape subt(const Scalar, const Permutation&) { return DenseShape(); }
static DenseShape mult(const DenseShape&) { return DenseShape(); }
static DenseShape mult(const DenseShape&, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape mult(const DenseShape&, const Scalar) { return DenseShape(); }
template <typename Scalar>
static DenseShape mult(const DenseShape&, const Scalar, const Permutation&) { return DenseShape(); }
template <typename Scalar>
static DenseShape gemm(const DenseShape&, const Scalar, const math::GemmHelper&)
{ return DenseShape(); }
template <typename Scalar>
static DenseShape gemm(const DenseShape&, const Scalar, const math::GemmHelper&, const Permutation&)
{ return DenseShape(); }
}; // class DenseShape
} // namespace TiledArray
#endif // TILEDARRAY_DENSE_SHAPE_H__INCLUDED
|