imate
C++/CUDA Reference
Loading...
Searching...
No Matches
c_orthogonalization.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3 * SPDX-License-Identifier: BSD-3-Clause
4 * SPDX-FileType: SOURCE
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the license found in the LICENSE.txt file in the root
8 * directory of this source tree.
9 */
10
11
12#ifndef _C_TRACE_ESTIMATOR_C_ORTHOGONALIZATION_H_
13#define _C_TRACE_ESTIMATOR_C_ORTHOGONALIZATION_H_
14
15// =======
16// Imports
17// =======
18
19#include "../_definitions/types.h" // IndexType, LongIndexType, FlagType
20
21
22// ===================
23// c Orthogonalization
24// ===================
25
33
34template <typename DataType>
36{
37 public:
38
39 // Gram-Schmidt Process
40 static void gram_schmidt_process(
41 const DataType* V,
42 const LongIndexType vector_size,
43 const IndexType num_vectors,
44 const IndexType last_vector,
45 const FlagType num_ortho,
46 DataType* r);
47
48 // Orthogonalize Vectors
49 static void orthogonalize_vectors(
50 DataType* vectors,
51 const LongIndexType vector_size,
52 const IndexType num_vectors);
53};
54
55#endif // _C_TRACE_ESTIMATOR_C_ORTHOGONALIZATION_H_
A static class for orthogonalization of vector bases. This class acts as a templated namespace,...
static void gram_schmidt_process(const DataType *V, const LongIndexType vector_size, const IndexType num_vectors, const IndexType last_vector, const FlagType num_ortho, DataType *r)
Modified Gram-Schmidt orthogonalization process to orthogonalize the vector v against a subset of the...
static void orthogonalize_vectors(DataType *vectors, const LongIndexType vector_size, const IndexType num_vectors)
Orthogonalizes set of vectors mutually using modified Gram-Schmidt process.
int LongIndexType
Definition types.h:60
int FlagType
Definition types.h:68
int IndexType
Definition types.h:65