Graphite  0.5.0
GPU-accelerated graph optimization framework
Loading...
Searching...
No Matches
identity.hpp
Go to the documentation of this file.
1
2#pragma once
4
5namespace graphite {
6
7template <typename T, typename S>
9private:
10 size_t dimension;
11
12public:
13 virtual void update_structure(Graph<T, S> *graph, StreamPool &streams) {
14 dimension = graph->get_hessian_dimension();
15 };
16
17 virtual void update_values(Graph<T, S> *graph, StreamPool &streams){};
18
19 virtual void set_damping_factor(Graph<T, S> *graph, T damping_factor,
20 const bool use_identity,
21 StreamPool &streams) {
22 (void)graph;
23 (void)damping_factor;
24 (void)use_identity;
25 (void)streams;
26 };
27
28 void apply(Graph<T, S> *graph, T *z, const T *r,
29 StreamPool &streams) override {
30 cudaMemcpy(z, r, dimension * sizeof(T), cudaMemcpyDeviceToDevice);
31 }
32};
33
34} // namespace graphite
Definition identity.hpp:8
Definition preconditioner.hpp:8
Definition stream.hpp:7
The top-level namespace for Graphite.
Definition eigen_solver.cpp:4