Skip to content

Commit

Permalink
Merge pull request #225 from LLNL/release/0.2.5
Browse files Browse the repository at this point in the history
Release version 0.2.5
  • Loading branch information
davidbeckingsale committed Mar 28, 2017
2 parents 3adec51 + f663db4 commit 28410e0
Show file tree
Hide file tree
Showing 87 changed files with 1,376 additions and 1,548 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ matrix:
- g++-6
env: COMPILER=g++-6
- WARN=""
- CMAKE_EXTRA_FLAGS="-DCMAKE_EXE_LINKER_FLAGS='-coverage' -DCMAKE_CXX_FLAGS='-coverage'"
- COVERAGE=t
- compiler: clang-3.6
addons:
apt:
Expand Down Expand Up @@ -76,6 +78,8 @@ before_install:
script:
- cd $TRAVIS_BUILD_DIR
- mkdir travis-build && cd travis-build
- cmake -DCMAKE_CXX_COMPILER="$COMPILER" $WARN ../
- cmake -DCMAKE_CXX_COMPILER="$COMPILER" $WARN $CMAKE_EXTRA_FLAGS ../
- make -j
- make test # currently does nothing, this is how testing should be done
- make test
after_success:
- if [[ -n "${COVERAGE}" ]] ; then bash <(curl -s https://codecov.io/bash) ; fi
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ project(RAJA LANGUAGES CXX C)
# Set version number
set(RAJA_VERSION_MAJOR 0)
set(RAJA_VERSION_MINOR 2)
set(RAJA_VERSION_PATCHLEVEL 4)
set(RAJA_VERSION_PATCHLEVEL 5)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/thirdparty" ${CMAKE_MODULE_PATH})

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*******************************************************************************

RAJA: ................................, version 0.2.4
RAJA: ................................, version 0.2.5

Copyright (c) 2016, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
RAJA v0.2.4
RAJA v0.2.5
============

[![Build Status](https://travis-ci.org/LLNL/RAJA.svg?branch=develop)](https://travis-ci.org/LLNL/RAJA)
[![Join the chat at https://gitter.im/llnl/raja](https://badges.gitter.im/llnl/raja.svg)](https://gitter.im/llnl/raja?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Coverage](https://img.shields.io/codecov/c/github/LLNL/RAJA/develop.svg)](https://codecov.io/gh/LLNL/RAJA)

RAJA is a collection of C++ software abstractions, being developed at
Lawrence Livermore National Laboratory (LLNL), that enable architecture
Expand Down
2 changes: 0 additions & 2 deletions cmake/SetupPackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ if (RAJA_ENABLE_TESTS)
CMAKE_ARGS
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
INSTALL_COMMAND ""
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
Expand Down
7 changes: 1 addition & 6 deletions cmake/SetupRajaConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ option(RAJA_REPORT_FT "Report on use of fault-tolerant features" OFF)
## Timer options
set(RAJA_TIMER "chrono" CACHE STRING
"Select a timer backend")
set_property(CACHE RAJA_TIMER PROPERTY STRINGS "chrono" "gettime" "clock" "cycle")
set_property(CACHE RAJA_TIMER PROPERTY STRINGS "chrono" "gettime" "clock" )

if (RAJA_TIMER STREQUAL "chrono")
set(RAJA_USE_CHRONO ON CACHE BOOL "Use the default std::chrono timer" )
Expand All @@ -82,11 +82,6 @@ if (RAJA_TIMER STREQUAL "clock")
else ()
set(RAJA_USE_CLOCK OFF CACHE BOOL "Use clock from time.h for timer" )
endif ()
if (RAJA_TIMER STREQUAL "cycle")
set(RAJA_USE_CYCLE ON CACHE BOOL "Use getticks from cycle.h for timer" )
else ()
set(RAJA_USE_CYCLE OFF CACHE BOOL "Use getticks from cycle.h for timer" )
endif ()

# Configure a header file with all the variables we found.
configure_file(${PROJECT_SOURCE_DIR}/include/RAJA/config.hxx.in
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# The short X.Y version.
version = u'0.2'
# The full version, including alpha/beta/rc tags.
release = u'0.2.4'
release = u'0.2.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/raja_license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RAJA License
===================================

RAJA version 0.2.4
RAJA version 0.2.5

Copyright (c) 2016, Lawrence Livermore National Security, LLC.

Expand Down
4 changes: 4 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@
raja_add_executable(
NAME raja-pi
SOURCES pi.cxx)

raja_add_executable(
NAME raja-includes
SOURCES includes.cxx)
21 changes: 21 additions & 0 deletions examples/includes.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <iostream>

#include "RAJA/forall.hxx"
#include "RAJA/sequential.hxx"

int main(int RAJA_UNUSED_ARG(argc), char** RAJA_UNUSED_ARG(argv[]))
{
typedef RAJA::seq_exec execute_policy;

int N = 512;

double* a = new double[N];

RAJA::forall<execute_policy>(0, N, [=](int i) {
a[i] = 3.14;
});

std::cout << "Filled array with PI!" << std::endl;

return 0;
}
4 changes: 2 additions & 2 deletions include/RAJA/IndexSet.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

#include "RAJA/config.hxx"

#include "RAJA/IndexSetSegInfo.hxx"
#include "RAJA/RAJAVec.hxx"
#include "RAJA/internal/IndexSetSegInfo.hxx"
#include "RAJA/internal/RAJAVec.hxx"

#include <iosfwd>

Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/IndexSetBuilders.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

#include "RAJA/config.hxx"

#include "RAJA/int_datatypes.hxx"
#include "RAJA/Types.hxx"

namespace RAJA
{
Expand Down
3 changes: 2 additions & 1 deletion include/RAJA/IndexValue.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@

#include <string>
#include "RAJA/internal/defines.hxx"
#include "RAJA/int_datatypes.hxx"

#include "RAJA/Types.hxx"

namespace RAJA
{
Expand Down
145 changes: 145 additions & 0 deletions include/RAJA/Layout.hxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/*!
******************************************************************************
*
* \file
*
* \brief RAJA header file defining layout operations for forallN templates.
*
******************************************************************************
*/

#ifndef RAJA_LAYOUT_HXX__
#define RAJA_LAYOUT_HXX__

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2016, Lawrence Livermore National Security, LLC.
//
// Produced at the Lawrence Livermore National Laboratory
//
// LLNL-CODE-689114
//
// All rights reserved.
//
// This file is part of RAJA.
//
// For additional details, please also read RAJA/LICENSE.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the disclaimer below.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the disclaimer (as noted below) in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the LLNS/LLNL nor the names of its contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
// LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
// IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

#include <iostream>
#include <limits>
#include "RAJA/IndexValue.hxx"
#include "RAJA/internal/LegacyCompatibility.hxx"
#include "Permutations.hxx"

namespace RAJA
{

template <typename Range, typename IdxLin = Index_type>
struct LayoutBase_impl { };

template <size_t... RangeInts,
typename IdxLin>
struct LayoutBase_impl<VarOps::index_sequence<RangeInts...>,
IdxLin> {
public:
typedef IdxLin IndexLinear;
typedef VarOps::make_index_sequence<sizeof...(RangeInts)> IndexRange;

static constexpr size_t n_dims = sizeof...(RangeInts);
static constexpr size_t limit = std::numeric_limits<IdxLin>::max();

// const char *index_types[sizeof...(RangeInts)];

const IdxLin sizes[n_dims];
IdxLin strides[n_dims];
IdxLin mods[n_dims];


// TODO: this should be constexpr in c++14 mode
template <typename... Types>
RAJA_INLINE RAJA_HOST_DEVICE LayoutBase_impl(Types... ns)
: sizes{convertIndex<IdxLin>(ns)...}
{
static_assert(n_dims == sizeof ... (Types), "number of dimensions must match");
for (size_t i = 0; i < n_dims; i++) {
strides[i] = 1;
for (size_t j = 0; j < i; j++) {
strides[j] *= sizes[i];
}
}

for (size_t i = 1; i < n_dims; i++) {
mods[i] = strides[i - 1];
}
mods[0] = limit;
}

constexpr RAJA_INLINE RAJA_HOST_DEVICE LayoutBase_impl(const LayoutBase_impl<IndexRange, IdxLin>& rhs)
: sizes{rhs.sizes[RangeInts]...},
strides{rhs.strides[RangeInts]...},
mods{rhs.mods[RangeInts]...}
{ }

template <typename... Types>
constexpr RAJA_INLINE LayoutBase_impl(const std::array<IdxLin, n_dims> &sizes_in,
const std::array<IdxLin, n_dims> &strides_in,
const std::array<IdxLin, n_dims> &mods_in)
: sizes{sizes_in[RangeInts]...},
strides{strides_in[RangeInts]...},
mods{mods_in[RangeInts]...}
{ }

template<typename... Indices>
RAJA_INLINE RAJA_HOST_DEVICE constexpr IdxLin operator()(Indices... indices) const
{
return VarOps::sum<IdxLin>((indices * strides[RangeInts])...);
}

template<typename... Indices>
RAJA_INLINE RAJA_HOST_DEVICE void toIndices(IdxLin linear_index,
Indices &... indices) const
{
VarOps::ignore_args( (indices = (linear_index / strides[RangeInts]) % sizes[RangeInts])... );
}
};

template <size_t... RangeInts, typename IdxLin>
constexpr size_t LayoutBase_impl<VarOps::index_sequence<RangeInts...>, IdxLin>::n_dims;
template <size_t... RangeInts, typename IdxLin>
constexpr size_t LayoutBase_impl<VarOps::index_sequence<RangeInts...>, IdxLin>::limit;

template <size_t n_dims, typename IdxLin = Index_type>
using Layout = LayoutBase_impl<VarOps::make_index_sequence<n_dims>, IdxLin>;


} // namespace RAJA

#endif
4 changes: 2 additions & 2 deletions include/RAJA/ListSegment.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@

#include "RAJA/config.hxx"

#include "RAJA/BaseSegment.hxx"
#include "RAJA/internal/BaseSegment.hxx"

#include "RAJA/exec-cuda/raja_cudaerrchk.hxx"
#include "RAJA/internal/exec-cuda/raja_cudaerrchk.hxx"

#include <algorithm>
#include <iosfwd>
Expand Down

0 comments on commit 28410e0

Please sign in to comment.