This file is indexed.

/usr/include/TiledArray/expressions/tsr_engine.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
/*
 *  This file is a part of TiledArray.
 *  Copyright (C) 2014  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
 *
 *  tsr_engine.h
 *  Mar 31, 2014
 *
 */

#ifndef TILEDARRAY_EXPRESSIONS_TSR_ENGINE_H__INCLUDED
#define TILEDARRAY_EXPRESSIONS_TSR_ENGINE_H__INCLUDED

#include <TiledArray/expressions/leaf_engine.h>
#include <TiledArray/tile_op/noop.h>
#include <TiledArray/tile_op/unary_wrapper.h>

namespace TiledArray {

  // Forward declaration
  template <typename, typename> class DistArray;

  namespace expressions {

    // Forward declaration
    template <typename, bool> class TsrExpr;
    template <typename, bool> class TsrEngine;

    template <typename Tile, typename Policy, bool Alias>
    struct EngineTrait<TsrEngine<DistArray<Tile, Policy>, Alias> > {
      // Argument typedefs
      typedef DistArray<Tile, Policy> array_type; ///< The array type

      // Operational typedefs
      // Note: the consumable flag is true for noop to avoid necessary copies.
      // This is OK because the result consumable flag is set to false.
      typedef TiledArray::Noop<typename array_type::eval_type, true>
          op_base_type; ///< The tile operation
      typedef TiledArray::detail::UnaryWrapper<op_base_type> op_type;
      typedef TiledArray::detail::LazyArrayTile<typename array_type::value_type,
          op_type> value_type;  ///< Tile type
      typedef typename eval_trait<value_type>::type eval_type;  ///< Evaluation tile type
      typedef typename TiledArray::detail::scalar_type<DistArray<Tile, Policy> >::type scalar_type;
      typedef Policy policy; ///< Policy type
      typedef TiledArray::detail::DistEval<value_type, policy> dist_eval_type; ///< The distributed evaluator type

      // Meta data typedefs
      typedef typename policy::size_type size_type; ///< Size type
      typedef typename policy::trange_type trange_type; ///< Tiled range type
      typedef typename policy::shape_type shape_type; ///< Shape type
      typedef typename policy::pmap_interface pmap_interface; ///< Process map interface type

      static constexpr bool consumable = ! Alias;
      static constexpr unsigned int leaves = 1;
    };

    /// Tensor expression engine

    /// \tparam Array The `DistArray` type
    /// \tparam Alias Indicates the array tiles should be computed as a
    /// temporary before assignment
    template <typename Array, bool Alias>
    class TsrEngine : public LeafEngine<TsrEngine<Array, Alias> > {
    public:
      // Class hierarchy typedefs
      typedef TsrEngine<Array, Alias> TsrEngine_; ///< This class type
      typedef LeafEngine<TsrEngine_> LeafEngine_; ///< Leaf base class type
      typedef typename LeafEngine_::ExprEngine_ ExprEngine_; ///< Expression engine base class

      // Argument typedefs
      typedef typename EngineTrait<TsrEngine_>::array_type array_type; ///< The `DistArray` type

      // Operational typedefs
      typedef typename EngineTrait<TsrEngine_>::value_type value_type; ///< Tensor value type
      typedef typename EngineTrait<TsrEngine_>::op_base_type op_base_type; ///< Tile base operation type
      typedef typename EngineTrait<TsrEngine_>::op_type op_type; ///< Tile operation type
      typedef typename EngineTrait<TsrEngine_>::policy policy; ///< The result policy type
      typedef typename EngineTrait<TsrEngine_>::dist_eval_type dist_eval_type; ///< This expression's distributed evaluator type

      // Meta data typedefs
      typedef typename EngineTrait<TsrEngine_>::size_type size_type; ///< Size type
      typedef typename EngineTrait<TsrEngine_>::trange_type trange_type; ///< Tiled range type type
      typedef typename EngineTrait<TsrEngine_>::shape_type shape_type; ///< Tensor shape type
      typedef typename EngineTrait<TsrEngine_>::pmap_interface pmap_interface; ///< Process map interface type

      template <typename A>
      TsrEngine(const TsrExpr<A, Alias>& expr) : LeafEngine_(expr) { }

      /// Non-permuting tile operation factory function

      /// \return The tile operation
      static op_type make_tile_op() {
        return op_type(op_base_type());
      }

      /// Permuting tile operation factory function

      /// \param perm The permutation to be applied to tiles
      /// \return The tile operation
      static op_type make_tile_op(const Permutation& perm) {
        return op_type(op_base_type(), perm);
      }

    }; // class TsrEngine

  }  // namespace expressions
} // namespace TiledArray

#endif // TILEDARRAY_EXPRESSIONS_TSR_ENGINE_H__INCLUDED