Ensign
Low-rank framework for multi-core CPUs and GPUs
Loading...
Searching...
No Matches
coefficients.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <generic/common.hpp>
9#include <generic/storage.hpp>
10#include <generic/matrix.hpp>
11
12namespace Ensign {
13
14/* Computes a low-rank coefficient that approximates \f$\int a_i(x) b_j(x) \,dx\f$.
15 *
16 * This functions assumes that w is a constant weight.
17*/
18template<class T>
19void coeff(const multi_array<T,2>& a, const multi_array<T,2>& b, T w, multi_array<T,2>& out, const Ensign::Matrix::blas_ops& blas);
20
21/* Computes a low-rank coefficient that approximates \f$\int a_i(x) b_j(x) \,dx\f$.
22 *
23 * If a and b are of size (n,r) then w must be of size n.
24 * The weight w can be used as a pure weight (in a quadrature sense) but also
25 * can incooperate a x dependent function.
26*/
27template<class T>
29
30/* Computes an approximation to the integral \f$\int a_i(x) \,dx\f$.
31*
32* This function assumes that w is a constant weight.
33*/
34template<class T>
36
37/* Computes an approximation to the integral \f$\int a_i(x) \,dx\f$.
38*
39* If a is of size (n,r) then w must be a contiguous memory region of size n.
40* The weight w can be used as a pure weight (in a quadrature sense) but also
41* can incooperate a x dependent function.
42*/
43template<class T>
45
46
47/* Computes a low-rank coefficient that approximates \f$\int a_i(x) b_j(x) b_k(x) \,dx\f$.
48 *
49 * This function assumes that w is a constant weight.
50*/
51template<class T>
52void coeff(const multi_array<T,2>& a, const multi_array<T,2>& b, const multi_array<T,2>& c, T w, multi_array<T,3>& out, const Ensign::Matrix::blas_ops& blas);
53
54} // namespace Ensign
Provides shared types, platform headers, and basic definitions.
Declares dense matrix and vector operations, including BLAS wrappers.
Core namespace for Ensign's numerical algorithms and data structures.
Definition common.hpp:96
void integrate(const multi_array< T, 2 > &a, T w, multi_array< T, 1 > &out, const Ensign::Matrix::blas_ops &blas)
Computes an approximation to the integral .
void coeff(const multi_array< T, 2 > &a, const multi_array< T, 2 > &b, T w, multi_array< T, 2 > &out, const Ensign::Matrix::blas_ops &blas)
Computes a low-rank coefficient that approximates .
Provides contiguous multidimensional arrays for CPU and GPU storage.
Provides matrix and vector operations with optional GPU execution.
Definition matrix.hpp:47
Dense d-dimensional array stored contiguously in column-major order (i.e.
Definition storage.hpp:24