Cuda battery library
Loading...
Searching...
No Matches
memory.hpp File Reference
#include <cassert>
#include <type_traits>
#include <utility>
#include <atomic>
#include "utility.hpp"

Go to the source code of this file.

Classes

class  battery::memory< read_only >
 
class  battery::atomic_memory< mem_order >
 

Namespaces

namespace  battery
 

Typedefs

using battery::local_memory = memory<false>
 
using battery::read_only_memory = memory<true>
 

Detailed Description

An abstraction of memory load and store useful to write a single version of an algorithm working either sequentially or in parallel, and on CPU or GPU. Note that these classes are mainly designed to work with a relaxed memory ordering; we are unsure of their applicability to other kinds of memory ordering.