Skip to content

Commit ad4d067

Browse files
committed
Merge branch 'develop' into ilr-simplex
2 parents c897d3f + 8efa507 commit ad4d067

3 files changed

Lines changed: 25 additions & 33 deletions

File tree

.github/workflows/main.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
os: [windows-latest, ubuntu-24.04-arm]
29+
os: [windows-11-arm, windows-latest, ubuntu-24.04-arm]
3030
config: [
3131
{ label: misc, tests: 'test/unit/*_test.cpp test/unit/math/*_test.cpp test/unit/math/memory' },
3232
{ label: prim, tests: 'test/unit/math/prim' },
@@ -41,27 +41,23 @@ jobs:
4141
with:
4242
python-version: '3.x'
4343

44-
- uses: r-lib/actions/setup-r@v2
44+
- name: Download and install Rtools45
4545
if: runner.os == 'Windows'
46-
with:
47-
r-version: 'release'
48-
rtools-version: '44'
49-
50-
- name: Set path for Rtools44
51-
if: runner.os == 'Windows'
52-
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
46+
run: |
47+
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
48+
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
49+
Invoke-WebRequest -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe -OutFile "$RTOOLS.exe"
50+
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
51+
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
52+
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
5353
5454
- name: Build Math libs
5555
shell: pwsh
5656
run: |
5757
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
58+
Add-Content make\local "STAN_THREADS=true`n"
5859
make -f make/standalone math-libs -j2
5960
60-
- name: Add TBB to PATH
61-
if: runner.os == 'Windows'
62-
shell: pwsh
63-
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
64-
6561
- name: Run ${{ matrix.config.label }} unit tests
6662
shell: pwsh
6763
run: |
@@ -80,7 +76,7 @@ jobs:
8076
strategy:
8177
fail-fast: false
8278
matrix:
83-
os: [windows-latest, ubuntu-24.04-arm]
79+
os: [windows-11-arm, windows-latest, ubuntu-24.04-arm]
8480
group: [1, 2, 3, 4, 5]
8581

8682
steps:
@@ -89,27 +85,23 @@ jobs:
8985
with:
9086
python-version: '3.x'
9187

92-
- uses: r-lib/actions/setup-r@v2
88+
- name: Download and install Rtools45
9389
if: runner.os == 'Windows'
94-
with:
95-
r-version: 'release'
96-
rtools-version: '44'
97-
98-
- name: Set path for Rtools44
99-
if: runner.os == 'Windows'
100-
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
90+
run: |
91+
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
92+
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
93+
Invoke-WebRequest -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe -OutFile "$RTOOLS.exe"
94+
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
95+
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
96+
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
10197
10298
- name: Build Math libs
10399
shell: pwsh
104100
run: |
105101
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
102+
Add-Content make\local "STAN_THREADS=true`n"
106103
make -f make/standalone math-libs -j2
107104
108-
- name: Add TBB to PATH
109-
if: runner.os == 'Windows'
110-
shell: pwsh
111-
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
112-
113105
- name: Run mix/fun unit tests
114106
shell: pwsh
115107
run: |

stan/math/prim/meta/holder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ namespace math {
231231
* expressions will be deleted.
232232
* @tparam T type of argument expression
233233
* @tparam Ptrs types of pointers
234-
* @param a argument expression
235-
* @param ptrs pointers to objects the constructed object will own.
234+
* @param arg argument expression
235+
* @param pointers pointers to objects the constructed object will own.
236236
* @return holder operation
237237
*/
238238
template <typename T, typename... Ptrs,

test/unit/math/rev/fun/to_var_value_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TEST(AgradRevMatrix, to_var_value_matrix_test) {
9595
Eigen::MatrixXd val(2, 3);
9696
val << 1, 2, 3, 4, 5, 6;
9797
Eigen::MatrixXd adj(2, 3);
98-
val << 4, 5, 6, 7, 8, 9;
98+
adj << 4, 5, 6, 7, 8, 9;
9999
Eigen::Matrix<stan::math::var, Eigen::Dynamic, Eigen::Dynamic> mat_var = val;
100100
stan::math::var_value<Eigen::MatrixXd> var_value
101101
= stan::math::to_var_value(mat_var);
@@ -109,7 +109,7 @@ TEST(AgradRevMatrix, to_var_value_vector_test) {
109109
Eigen::VectorXd val(3);
110110
val << 1, 2, 3;
111111
Eigen::VectorXd adj(3);
112-
val << 7, 8, 9;
112+
adj << 7, 8, 9;
113113
Eigen::Matrix<stan::math::var, Eigen::Dynamic, 1> mat_var = val;
114114
stan::math::var_value<Eigen::VectorXd> var_value
115115
= stan::math::to_var_value(mat_var);
@@ -123,7 +123,7 @@ TEST(AgradRevMatrix, to_var_value_row_vector_test) {
123123
Eigen::RowVectorXd val(3);
124124
val << 1, 2, 3;
125125
Eigen::RowVectorXd adj(3);
126-
val << 7, 8, 9;
126+
adj << 7, 8, 9;
127127
Eigen::Matrix<stan::math::var, 1, Eigen::Dynamic> mat_var = val;
128128
stan::math::var_value<Eigen::RowVectorXd> var_value
129129
= stan::math::to_var_value(mat_var);

0 commit comments

Comments
 (0)