Skip to content
Snippets Groups Projects

Kokkos Portability Layer

Merged Slattery, Stuart requested to merge (removed):parallel_for into master
3 unresolved threads
3 files
+ 87
35
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 38
0
#ifndef CABANA_EXECUTIONPOLICY_HPP
#define CABANA_EXECUTIONPOLICY_HPP
#include <Cabana_Index.hpp>
namespace Cabana
{
//---------------------------------------------------------------------------//
/*!
\class IndexRangePolicy
\brief Execution policy over a range of indices.
*/
template<class ExecutionSpace>
class IndexRangePolicy
{
public:
using execution_space = ExecutionSpace;
IndexRangePolicy( const Index& begin, const Index& end )
: _begin( begin )
, _end( end )
{}
KOKKOS_INLINE_FUNCTION Index begin() const { return _begin; }
KOKKOS_INLINE_FUNCTION Index end() const { return _end; }
private:
Index _begin;
Index _end;
};
//---------------------------------------------------------------------------//
} // end namespace Cabana
#endif // end CABANA_EXECUTIONPOLICY_HPP
Loading