Skip to content

Commit

Permalink
Merge 8757910 into c06bb71
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornung67 committed Jun 25, 2018
2 parents c06bb71 + 8757910 commit b50898a
Show file tree
Hide file tree
Showing 152 changed files with 3,004 additions and 1,213 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
###############################################################################
# Set version number
set(RAJA_VERSION_MAJOR 0)
set(RAJA_VERSION_MINOR 5)
set(RAJA_VERSION_PATCHLEVEL 3)
set(RAJA_VERSION_MINOR 6)
set(RAJA_VERSION_PATCHLEVEL 0)

if (RAJA_LOADED AND (NOT RAJA_LOADED STREQUAL "${RAJA_VERSION_MAJOR}.${RAJA_VERSION_MINOR}.${RAJA_VERSION_PATCHLEVEL}"))
message(FATAL_ERROR "You are mixing RAJA versions. Loaded is ${RAJA_LOADED}, expected ${RAJA_VERSION_MAJOR}.${RAJA_VERSION_MINOR}.${RAJA_VERSION_PATCHLEVEL}")
Expand Down Expand Up @@ -83,8 +83,7 @@ if (NOT RAJA_LOADED)
src/AlignedRangeIndexSetBuilders.cpp
src/DepGraphNode.cpp
src/LockFreeIndexSetBuilders.cpp
src/MemUtils_CUDA.cpp
src/ThreadUtils_CPU.cpp)
src/MemUtils_CUDA.cpp)

set (raja_depends)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RAJA v0.5.3
RAJA v0.6.0
============

[![Build Status](https://travis-ci.org/LLNL/RAJA.svg?branch=develop)](https://travis-ci.org/LLNL/RAJA)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*******************************************************************************

RAJA: ................................, version 0.5.3
RAJA: ................................, version 0.6.0

Copyright (c) 2016-17, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory.
Expand Down
21 changes: 21 additions & 0 deletions docs/sphinx/user_guide/app_considerations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. ##
.. ## Copyright (c) 2016-18, 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 details about use and distribution, please read RAJA/LICENSE.
.. ##
.. _app-considerations-label:

***************************
Application Considerations
***************************

.. warning:: **This section is a work-in-progress!!**
8 changes: 4 additions & 4 deletions docs/sphinx/user_guide/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@

# General information about the project.
project = u'RAJA'
copyright = u'2017'
copyright = u'2016-2018'
author = u'LLNS'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.5'
version = u'0.6'
# The full version, including alpha/beta/rc tags.
release = u'0.5.3'
release = u'0.6.0rc3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -138,7 +138,7 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
#html_theme_options = {'codebgcolor': 'lightgrey'}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx/user_guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
.. _configopt-label:

***********************
Configuration Options
***********************
****************************
Build Configuration Options
****************************

RAJA uses `BLT <https://github.com/LLNL/blt>`_, a CMake-based build system .
In :ref:`getting_started-label`, we described how to run CMake to configure
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/user_guide/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ is used on a wide variety of systems with a number of configurations, and adding
new tests helps ensure that all features work as expected across these
environments.

RAJA's tests are all in the ``test`` directory and are split up by backend and
feature.
RAJA's tests are all in the ``test`` directory and are split up by programming
model back-end and feature.
46 changes: 24 additions & 22 deletions docs/sphinx/user_guide/feature/atomic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@
Atomics
========

To avoid race conditions at specific memory locations, RAJA provides
portable atomic operations, which are described in this section.
RAJA provides portable atomic operations that can be used to update values
at arbitrary memory locations while avoiding data races. They are described
in this section.

A complete working example code that shows RAJA atomic usage can be found in
:ref:`atomichist-label`.

.. note:: * All RAJA atomic operations are in the namespace ``RAJA::atomic``.

-----------------
Atomic Operations
-----------------

.. note:: * All RAJA atomic operations are in the namespace ``RAJA::atomic``.
* Each RAJA atomic operation is templated on an *atomic policy*.
Atomic policies are described in the next section.
RAJA atomic support includes a range of the most common atomic operations.

.. note:: * Each RAJA atomic operation is templated on an *atomic policy*.
* Each of methods below returns the value of the potentially modified
argument (i.e., \*acc) immediately before the atomic operation is
applied.
Expand Down Expand Up @@ -60,8 +66,6 @@ Increment/decrement

* ``atomicDec< atomic_policy >(T* acc, T compare)`` - Subtract 1 from \*acc if \*acc != 0 and \*acc <= compare, else set \*acc to compare.

* ``atomicDec< atomic_policy >(T* acc, T compare)`` - Subtract 1 from \*acc if \*acc != 0 and \*acc <= compare, else set \*acc to compare.

^^^^^^^^^^^^^^^^^^^^
Bitwise atomics
^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -97,7 +101,7 @@ a integral sum on a CUDA GPU device::
RAJA::forall< RAJA::cuda_exec >(RAJA::RangeSegment(0, N),
[=] RAJA_DEVICE (RAJA::Index_type i) {

RAJA::atomic::atomicAdd< RAJA::cuda_atomic >(sum, 1);
RAJA::atomic::atomicAdd< RAJA::cuda_atomic >(&sum, 1);

});

Expand All @@ -107,32 +111,33 @@ After this operation, 'sum' will be equal to 'N'.
AtomicRef
^^^^^^^^^^^^^^^^^^^^

RAJA also provides an atomic interface similar to C++ 'std::atomic', but for
arbitrary memory locations. The class ``RAJA::atomic::AtomicRef`` provides
an object-oriented interface to the atomic methods described above. For
example, after the following operations::
RAJA also provides an atomic interface similar to C++ 'std::atomic', but which
works for arbitrary memory locations. The class ``RAJA::atomic::AtomicRef``
provides an object-oriented interface to the atomic methods described above.
For example, after the following operations::

double val = 2.0;
RAJA::atomic::AtomicRef<double, RAJA::seq_atomic > sum(&val);
RAJA::atomic::AtomicRef<double, RAJA::omp_atomic > sum(&val);

sum++;
++sum;
sum += 1.0;

the value of 'val' will be 5.

Note that the operators that the 'AtomicRef' class provide return the object
that holds the address of the data given passes the constructor. If you need
to keep the original value of the data before the atomic call, you need to
use the atomic methods listed above.
Note that the operations provided by the 'AtomicRef' class return the object
that holds the address of the data given to the constructor. It will likely
change with each atomic update call. If you need to keep the original value
of the data before an atomic call, you need to use the atomic methods described
earlier and not the ``RAJA::atomic::AtomicRef`` interface.

---------------
Atomic Policies
---------------

.. note:: * All RAJA atomic policies are in the namespace ``RAJA::atomic``.
* There are no RAJA atomic policies for TBB (Intel Threading Building
Blocks) execution contexts.
Blocks) execution contexts currently.

* ``seq_atomic`` - Policy for use in sequential execution contexts, primarily for consistency with parallel policies. Note that sequential atomic operations are not protected and will likely produce incorrect results when used in a parallel execution context.

Expand All @@ -149,14 +154,11 @@ For example, we could use the 'auto_atomic' policy in the example above::
RAJA::forall< RAJA::cuda_exec >(RAJA::RangeSegment seg(0, N),
[=] RAJA_DEVICE (RAJA::Index_type i) {

RAJA::atomic::atomicAdd< RAJA::auto_atomic >(sum, 1);
RAJA::atomic::atomicAdd< RAJA::auto_atomic >(&sum, 1);

});

Here, the atomic operation knows that it is used within a CUDA execution
context and does the right thing. Similarly, if the 'forall' method used
an OpenMP execution policy, the OpenMP version of the atomic operation
would be used.

A complete working code that shows RAJA atomic usage can be found in
``<build-dir>/examples/ex8-pi-reduce_vs_atomic.cpp``.
98 changes: 0 additions & 98 deletions docs/sphinx/user_guide/feature/index.rst

This file was deleted.

0 comments on commit b50898a

Please sign in to comment.