Skip to content

Commit

Permalink
Auto-format code changes (#672)
Browse files Browse the repository at this point in the history
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
github-actions[bot] and actions-user authored Sep 30, 2024
1 parent 736409f commit 023c83d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 21 deletions.
5 changes: 1 addition & 4 deletions include/micm/jit/solver/jit_linear_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ namespace micm

/// @brief Decompose the matrix into upper and lower triangular matrices and general JIT functions
/// @param matrix Matrix that will be factored into lower and upper triangular matrices
void Factor(
SparseMatrixPolicy& matrix,
SparseMatrixPolicy& lower_matrix,
SparseMatrixPolicy& upper_matrix) const;
void Factor(SparseMatrixPolicy& matrix, SparseMatrixPolicy& lower_matrix, SparseMatrixPolicy& upper_matrix) const;

/// @brief Solve for x in Ax = b
template<class MatrixPolicy>
Expand Down
3 changes: 1 addition & 2 deletions include/micm/jit/solver/jit_lu_decomposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ namespace micm
/// @param lower The lower triangular matrix created by decomposition
/// @param upper The upper triangular matrix created by decomposition
template<class SparseMatrixPolicy>
void Decompose(const SparseMatrixPolicy &A, SparseMatrixPolicy &lower, SparseMatrixPolicy &upper)
const;
void Decompose(const SparseMatrixPolicy &A, SparseMatrixPolicy &lower, SparseMatrixPolicy &upper) const;

private:
/// @brief Generates a function to perform the LU decomposition for a specific matrix sparsity structure
Expand Down
6 changes: 2 additions & 4 deletions include/micm/jit/solver/jit_lu_decomposition.inl
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,8 @@ namespace micm

template<std::size_t L>
template<class SparseMatrixPolicy>
void JitLuDecomposition<L>::Decompose(
const SparseMatrixPolicy &A,
SparseMatrixPolicy &lower,
SparseMatrixPolicy &upper) const
void JitLuDecomposition<L>::Decompose(const SparseMatrixPolicy &A, SparseMatrixPolicy &lower, SparseMatrixPolicy &upper)
const
{
decompose_function_(A.AsVector().data(), lower.AsVector().data(), upper.AsVector().data());
for (size_t block = 0; block < A.NumberOfBlocks(); ++block)
Expand Down
5 changes: 1 addition & 4 deletions include/micm/solver/linear_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ namespace micm

/// @brief Decompose the matrix into upper and lower triangular matrices
/// @param matrix Matrix to decompose into lower and upper triangular matrices
void Factor(
const SparseMatrixPolicy& matrix,
SparseMatrixPolicy& lower_matrix,
SparseMatrixPolicy& upper_matrix) const;
void Factor(const SparseMatrixPolicy& matrix, SparseMatrixPolicy& lower_matrix, SparseMatrixPolicy& upper_matrix) const;

/// @brief Solve for x in Ax = b. x should be a copy of b and after Solve finishes x will contain the result
template<class MatrixPolicy>
Expand Down
7 changes: 1 addition & 6 deletions include/micm/solver/rosenbrock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ namespace micm
/// @param number_densities The number densities
/// @param stats The solver stats
/// @param state The state
void LinearFactor(
double& H,
const double gamma,
const auto& number_densities,
SolverStats& stats,
auto& state) const;
void LinearFactor(double& H, const double gamma, const auto& number_densities, SolverStats& stats, auto& state) const;

/// @brief Computes the scaled norm of the vector errors
/// @param y the original vector
Expand Down
2 changes: 1 addition & 1 deletion src/process/process_set.cu
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace micm
const double* const d_yields = devstruct.yields_;
const size_t number_of_grid_cells = rate_constants_param.number_of_grid_cells_;
const size_t number_of_reactions =
rate_constants_param.number_of_elements_ / rate_constants_param.number_of_grid_cells_;
rate_constants_param.number_of_elements_ / rate_constants_param.number_of_grid_cells_;
const double* const d_rate_constants = rate_constants_param.d_data_;
const double* const d_state_variables = state_variables_param.d_data_;
double* const d_forcing = forcing_param.d_data_;
Expand Down

0 comments on commit 023c83d

Please sign in to comment.