struct rgpot::nlist::Table

Overview

Owning table. More…

#include <NeighbourList.hpp>
 
struct Table {
    // fields
 
    std::vector<std::int32_t> first;
    std::vector<std::int32_t> second;
    std::vector<std::int32_t> shift;
    std::vector<double> vector;
    std::vector<double> distance;
    std::vector<std::uint8_t> mask;
    int device = 0;
    bool stored = false;
 
    // methods
 
    std::size_t size() const;
    std::span<const double> column_major_vectors() const;
    View view() const;
};

Detailed Documentation

Owning table. The arrays are the storage a caller can wrap without copying. device is 0 for host memory. A GPU fill would use the same layout and a non-zero device id; this build fills host memory.

Methods

std::span<const double> column_major_vectors() const

vector as a Fortran (3, npairs) array. Pair p is x, y, z at elements 3p, 3p+1, 3p+2. Same memory as vector.