Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
motchy869 authored Jun 18, 2022
2 parents c58f6fc + 2737fba commit dab0494
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cSpell.words": [
"cerr",
"Doxywizard",
"Exchg",
"fsanitize",
"fstack",
"gmock",
Expand All @@ -12,6 +13,7 @@
"libgtest",
"libiconv",
"SUBDIRS",
"tparam",
"UNDOC",
"Wextra",
"Wfatal",
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.9.0] - 2022-06-18

- Added
- More data type flexibility of `addDiag()`; Different data types are allowed for vector and matrix.

## [v0.8.0] - 2022-06-17

- Fixed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ enable_testing()
add_test(NAME test_analysis COMMAND test_analysis)
add_test(NAME test_linAlg COMMAND test_linAlg)
add_test(NAME test_sigProc COMMAND test_sigProc)
add_test(NAME test_rlsFilter COMMAND test_rlsFilter)
add_test(NAME test_RlsFilter COMMAND test_RlsFilter)
2 changes: 1 addition & 1 deletion include/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#pragma once
#define MATH_LIB_VER_MAJOR 0
#define MATH_LIB_VER_MINOR 8
#define MATH_LIB_VER_MINOR 9
#define MATH_LIB_VER_PATCH 0
#define MATH_LIB_VER_ALPHA 0 // 0 if release version, 1 if alpha version
#define MATH_LIB_ENABLE_CANARY_MODE false
Expand Down
9 changes: 5 additions & 4 deletions include/linAlg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ namespace MathLib {
* @brief Fill lower triangle part of a given matrix "A" with a given value "x".
* The diagonal boundary is controlled by a parameter "d", defaults to 0.
* "d=0" corresponds to the main diagonal line.
* "d=k (k>0)" corresponds "k"-th upper subdiagonal line, and "d=-k (k>0)" corresponds to "k"-th lower subdiagonal line.
* "d=k (k>0)" corresponds "k"-th upper sub-diagonal line, and "d=-k (k>0)" corresponds to "k"-th lower sub-diagonal line.
*/
template <typename T>
#if MATH_LIB_INLINE_AGGRESSIVELY
Expand All @@ -222,18 +222,19 @@ namespace MathLib {
/**
* @brief Add a given vector "d" to the diagonal entries of a given square matrix "A".
*
* @tparam T the number type of the elements of "d, A".
* @tparam T1 the number type of the elements of "d"
* @tparam T2 the number type of the elements of "A"
* @param[in] m the number of the rows in the matrices "A"
* @param[in] d "d"
* @param[out] A "A"
*/
template <typename T>
template <typename T1, typename T2>
#if MATH_LIB_INLINE_AGGRESSIVELY
inline static void __attribute__((always_inline))
#else
void
#endif
addDiag(const size_t m, const T *const d, T *const A) {
addDiag(const size_t m, const T1 *const d, T2 *const A) {
for (size_t r=0; r<m; ++r) {A[r*m+r] += d[r];}
}

Expand Down
Empty file modified scripts/doDebugBuild.sh
100644 → 100755
Empty file.
Empty file modified scripts/doTest.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ link_directories(${CMAKE_GMOCK_LIB_DIR})
add_executable(test_analysis ${CMAKE_CURRENT_SOURCE_DIR}/test_analysis.cpp)
add_executable(test_linAlg ${CMAKE_CURRENT_SOURCE_DIR}/test_linAlg.cpp)
add_executable(test_sigProc ${CMAKE_CURRENT_SOURCE_DIR}/test_sigProc.cpp)
add_executable(test_rlsFilter ${CMAKE_CURRENT_SOURCE_DIR}/test_rlsFilter.cpp)
add_executable(test_RlsFilter ${CMAKE_CURRENT_SOURCE_DIR}/test_RlsFilter.cpp)

# Link libraries
target_link_libraries(test_analysis motchyMathLib gtest gtest_main pthread)
target_link_libraries(test_linAlg motchyMathLib gtest gtest_main pthread)
target_link_libraries(test_sigProc motchyMathLib gtest gtest_main pthread)
target_link_libraries(test_rlsFilter motchyMathLib gtest gtest_main pthread)
target_link_libraries(test_RlsFilter motchyMathLib gtest gtest_main pthread)

0 comments on commit dab0494

Please sign in to comment.