Graphite
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 StreamPool &streams){};
21
22 void apply(Graph<T, S> *graph, T *z, const T *r,
23 StreamPool &streams) override {
24 cudaMemcpy(z, r, dimension * sizeof(T), cudaMemcpyDeviceToDevice);
25 }
26};
27
28} // namespace graphite
Definition identity.hpp:8
Definition preconditioner.hpp:8
Definition stream.hpp:7