Blender V4.3
linear_solver.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004 Bruno Levy
2 * SPDX-FileCopyrightText: 2005-2015 Blender Authors
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later */
5
11#pragma once
12
13#include <stdbool.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* Solvers for Ax = b and AtAx = Atb */
20
22
23LinearSolver *EIG_linear_solver_new(int num_rows, int num_columns, int num_right_hand_sides);
24
26 int num_columns,
27 int num_right_hand_sides);
28
30
31/* Variables (x). Any locking must be done before matrix construction. */
32
33void EIG_linear_solver_variable_set(LinearSolver *solver, int rhs, int index, double value);
34double EIG_linear_solver_variable_get(LinearSolver *solver, int rhs, int index);
35void EIG_linear_solver_variable_lock(LinearSolver *solver, int index);
36void EIG_linear_solver_variable_unlock(LinearSolver *solver, int index);
37
38/* Matrix (A) and right hand side (b) */
39
40void EIG_linear_solver_matrix_add(LinearSolver *solver, int row, int col, double value);
41void EIG_linear_solver_right_hand_side_add(LinearSolver *solver, int rhs, int index, double value);
42
43/* Solve. Repeated solves are supported, by changing b between solves. */
44
46
47/* Debugging */
48
50
51#ifdef __cplusplus
52}
53#endif
local_group_size(16, 16) .push_constant(Type rhs
uint col
void EIG_linear_solver_print_matrix(LinearSolver *solver)
LinearSolver * EIG_linear_solver_new(int num_rows, int num_columns, int num_right_hand_sides)
void EIG_linear_solver_variable_set(LinearSolver *solver, int rhs, int index, double value)
void EIG_linear_solver_right_hand_side_add(LinearSolver *solver, int rhs, int index, double value)
void EIG_linear_solver_variable_unlock(LinearSolver *solver, int index)
LinearSolver * EIG_linear_least_squares_solver_new(int num_rows, int num_columns, int num_right_hand_sides)
void EIG_linear_solver_delete(LinearSolver *solver)
double EIG_linear_solver_variable_get(LinearSolver *solver, int rhs, int index)
void EIG_linear_solver_matrix_add(LinearSolver *solver, int row, int col, double value)
bool EIG_linear_solver_solve(LinearSolver *solver)
void EIG_linear_solver_variable_lock(LinearSolver *solver, int index)