Loading...
Searching...
No Matches
gpr::TrainingKernelGeometry Struct Reference

#include <gpr/ml/GaussianProcessRegression.h>

Public Member Functions

void clear ()
const TrainingKernelGeometryBlock * find (Index_t block_n, Index_t block_m) const

Public Attributes

std::vector< TrainingKernelGeometryBlock > blocks
bool shared_coordinates = true
 Channel blocks carry the same Cartesian positions.
std::vector< FieldMatrixd > shared_distance_neg_per_pt
Eigen::VectorXd uDdim
Index_t num_repetitive_indices = 0
Eigen::Index n = 0
bool valid = false
std::map< std::pair< Index_t, Index_t >, std::size_t > block_index_by_nm
Index_t n_pairtypes = 0
TrainingKernelGeometrySubset rows_cols
TrainingKernelGeometrySubset cols_rows
bool has_per_rank_subset = false
bool streamed = false
std::vector< FieldMatrixd > x_loc_by_dim
 indexed by dimension value
FactoredTrainingGeometry factors
 streamed blocks come from here
std::shared_ptr< LazyFactoredTrainingGeometry > lazy_factors
pairlocal::Geometry pair_local

Detailed Description

Definition at line 199 of file GaussianProcessRegression.h.

Member Function Documentation

◆ clear()

void gpr::TrainingKernelGeometry::clear ( )
inline

Definition at line 250 of file GaussianProcessRegression.h.

251 {
252 streamed = false;
253 shared_coordinates = true;
254 x_loc_by_dim.clear();
255 factors = FactoredTrainingGeometry{};
256 lazy_factors.reset();
257 pair_local = pairlocal::Geometry{};
258 blocks.clear();
260 uDdim.resize(0);
262 n = 0;
263 valid = false;
264 block_index_by_nm.clear();
265 n_pairtypes = 0;
266 derivative_geometry_build_calls_for_testing = 0;
267 gradient_live_geometry_builds_for_testing = 0;
268 directional_geometry_blocks_for_testing = 0;
269 rows_cols.clear();
270 cols_rows.clear();
271 has_per_rank_subset = false;
272 }
TrainingKernelGeometrySubset cols_rows
bool shared_coordinates
Channel blocks carry the same Cartesian positions.
std::vector< TrainingKernelGeometryBlock > blocks
FactoredTrainingGeometry factors
streamed blocks come from here
std::shared_ptr< LazyFactoredTrainingGeometry > lazy_factors
TrainingKernelGeometrySubset rows_cols
std::vector< FieldMatrixd > x_loc_by_dim
indexed by dimension value
std::map< std::pair< Index_t, Index_t >, std::size_t > block_index_by_nm
std::vector< FieldMatrixd > shared_distance_neg_per_pt

◆ find()

const TrainingKernelGeometryBlock * gpr::TrainingKernelGeometry::find ( Index_t block_n,
Index_t block_m ) const
inlinenodiscard

Definition at line 273 of file GaussianProcessRegression.h.

275 {
276 auto it = block_index_by_nm.find({block_n, block_m});
277 if (it == block_index_by_nm.end()) return nullptr;
278 return &blocks[it->second];
279 }

Member Data Documentation

◆ block_index_by_nm

std::map<std::pair<Index_t, Index_t>, std::size_t> gpr::TrainingKernelGeometry::block_index_by_nm

Definition at line 217 of file GaussianProcessRegression.h.

◆ blocks

std::vector<TrainingKernelGeometryBlock> gpr::TrainingKernelGeometry::blocks

Definition at line 200 of file GaussianProcessRegression.h.

◆ cols_rows

TrainingKernelGeometrySubset gpr::TrainingKernelGeometry::cols_rows

Definition at line 231 of file GaussianProcessRegression.h.

◆ factors

FactoredTrainingGeometry gpr::TrainingKernelGeometry::factors

streamed blocks come from here

Definition at line 244 of file GaussianProcessRegression.h.

◆ has_per_rank_subset

bool gpr::TrainingKernelGeometry::has_per_rank_subset = false

Definition at line 232 of file GaussianProcessRegression.h.

◆ lazy_factors

std::shared_ptr<LazyFactoredTrainingGeometry> gpr::TrainingKernelGeometry::lazy_factors

Definition at line 245 of file GaussianProcessRegression.h.

◆ n

Eigen::Index gpr::TrainingKernelGeometry::n = 0

Definition at line 212 of file GaussianProcessRegression.h.

◆ n_pairtypes

Index_t gpr::TrainingKernelGeometry::n_pairtypes = 0

Definition at line 221 of file GaussianProcessRegression.h.

◆ num_repetitive_indices

Index_t gpr::TrainingKernelGeometry::num_repetitive_indices = 0

Definition at line 211 of file GaussianProcessRegression.h.

◆ pair_local

pairlocal::Geometry gpr::TrainingKernelGeometry::pair_local

Pair-local tiles: the joint covariance and its hyperparameter contractions per configuration pair, the assembly and gradient of choice whenever it is valid.

Definition at line 249 of file GaussianProcessRegression.h.

◆ rows_cols

TrainingKernelGeometrySubset gpr::TrainingKernelGeometry::rows_cols

Definition at line 230 of file GaussianProcessRegression.h.

◆ shared_coordinates

bool gpr::TrainingKernelGeometry::shared_coordinates = true

Channel blocks carry the same Cartesian positions.

Definition at line 202 of file GaussianProcessRegression.h.

◆ shared_distance_neg_per_pt

std::vector<FieldMatrixd> gpr::TrainingKernelGeometry::shared_distance_neg_per_pt

Definition at line 209 of file GaussianProcessRegression.h.

◆ streamed

bool gpr::TrainingKernelGeometry::streamed = false

Streamed geometry: the per-block derivative tensors (three per-pair-type n_conf x n_conf fields for each of the (1+D)(2+D)/2 blocks) are not cached; each consumer rebuilds a block's tensors from the stored per-dimension coordinate blocks as it walks the blocks. Chosen for distinct channel positions or when the cache would not fit the available memory (16_h2po4_anion: 15 GB at 225 rows and 22 dof, the OOM killer at 300); costs one geometry build per assembly instead of one per prepare.

Definition at line 242 of file GaussianProcessRegression.h.

◆ uDdim

Eigen::VectorXd gpr::TrainingKernelGeometry::uDdim

Definition at line 210 of file GaussianProcessRegression.h.

◆ valid

bool gpr::TrainingKernelGeometry::valid = false

Definition at line 213 of file GaussianProcessRegression.h.

◆ x_loc_by_dim

std::vector<FieldMatrixd> gpr::TrainingKernelGeometry::x_loc_by_dim

indexed by dimension value

Definition at line 243 of file GaussianProcessRegression.h.


The documentation for this struct was generated from the following file: