ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
index.hpp File Reference
#include <cassert>
#include <cstddef>
#include <iterator>
#include <numeric>
#include <stdexcept>
#include "Vector.hpp"
#include "device_qualifier.hpp"
+ Include dependency graph for index.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Utils
 

Enumerations

enum class  Utils::MemoryOrder { Utils::COLUMN_MAJOR , Utils::ROW_MAJOR }
 

Functions

template<MemoryOrder memory_order>
DEVICE_QUALIFIER int Utils::get_linear_index (int a, int b, int c, Vector3i const &adim)
 
DEVICE_QUALIFIER int Utils::get_linear_index (int a, int b, int c, Vector3i const &adim, MemoryOrder memory_order=MemoryOrder::COLUMN_MAJOR)
 Get the linear index from the position (a,b,c) in a 3D grid of dimensions adim.
 
DEVICE_QUALIFIER int Utils::get_linear_index (Vector3i const &ind, Vector3i const &adim, MemoryOrder memory_order=MemoryOrder::COLUMN_MAJOR)
 
template<MemoryOrder memory_order>
DEVICE_QUALIFIER int Utils::get_linear_index (Vector3i const &ind, Vector3i const &adim)
 
template<class T >
DEVICE_QUALIFIERUtils::lower_triangular (T i, T j)
 Linear index into a lower triangular matrix.