density_clustering_cuda.hpp
1 #pragma once
2 
3 #include "config.hpp"
5 
6 #include <map>
7 #include <vector>
8 
9 namespace Clustering {
10 namespace Density {
11 namespace CUDA {
12 
13  void
14  check_error(std::string msg="");
15 
16  int
17  get_num_gpus();
18 
20 
21  Pops
22  calculate_populations_partial(const float* coords
23  , const std::vector<float>& sorted_coords
24  , const std::vector<float>& blimits
25  , std::size_t n_rows
26  , std::size_t n_cols
27  , std::vector<float> radii
28  , std::size_t i_from
29  , std::size_t i_to
30  , int i_gpu);
31 
32  Pops
33  calculate_populations(const float* coords
34  , const std::size_t n_rows
35  , const std::size_t n_cols
36  , std::vector<float> radii);
37 
38  std::tuple<Neighborhood, Neighborhood>
39  nearest_neighbors(const float* coords,
40  const std::size_t n_rows,
41  const std::size_t n_cols,
42  const std::vector<float>& free_energy);
43 
44  std::vector<std::size_t>
45  sanitize_state_names(std::vector<std::size_t> clustering);
46 
47  std::vector<std::size_t>
48  screening(const std::vector<float>& free_energy
49  , const Neighborhood& nh
50  , const float free_energy_threshold
51  , const float* coords
52  , const std::size_t n_rows
53  , const std::size_t n_cols
54  , const std::vector<std::size_t> initial_clusters);
55 
56  std::set<std::size_t>
57  high_density_neighborhood(const float* coords,
58  const std::size_t n_cols,
59  const std::vector<FreeEnergy>& sorted_fe,
60  const std::size_t i_frame,
61  const std::size_t limit,
62  const float max_dist);
63 
64 }}} // end Clustering::Density::CUDA
65 
general namespace for clustering package
Definition: coring.cpp:38
std::set< std::size_t > high_density_neighborhood(const float *coords, const std::size_t n_cols, const std::vector< FreeEnergy > &sorted_fe, const std::size_t i_frame, const std::size_t limit, const float max_dist)
Clustering::Tools::Neighborhood Neighborhood
map frame id to neighbors
std::tuple< Neighborhood, Neighborhood > nearest_neighbors(const float *coords, const std::size_t n_rows, const std::size_t n_cols, const std::vector< float > &free_energy)
std::map< std::size_t, Clustering::Tools::Neighbor > Neighborhood
map frame id to neighbors
Definition: tools.hpp:66
std::vector< std::size_t > calculate_populations(const float *coords, const std::size_t n_rows, const std::size_t n_cols, const float radius)
calculate population of n-dimensional hypersphere per frame for one fixed radius. ...
std::vector< std::size_t > screening(const std::vector< float > &free_energy, const Neighborhood &nh, const float free_energy_threshold, const float *coords, const std::size_t n_rows, const std::size_t n_cols, const std::vector< std::size_t > initial_clusters)