Skip to content

Commit a6d0cab

Browse files
committed
Update size reducer snapshots
1 parent 76852ef commit a6d0cab

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

tests/testthat/_snaps/c-bridge-hoist.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
cat(fsub)
2323
Output
2424
subroutine fn(n, m, a, b, out) bind(c)
25-
use iso_c_binding, only: c_double, c_int
25+
use iso_c_binding, only: c_double, c_int, c_ptrdiff_t
2626
implicit none
2727
2828
! manifest start
2929
! args
3030
integer(c_int), intent(in) :: n
3131
integer(c_int), intent(in) :: m
32-
real(c_double), intent(in) :: a(min(n, m))
33-
real(c_double), intent(in) :: b(min(n, m))
34-
real(c_double), intent(out) :: out(min(n, m))
32+
real(c_double), intent(in) :: a(int((min(real(n, kind=c_double), real(m, kind=c_double))), kind=c_ptrdiff_t))
33+
real(c_double), intent(in) :: b(int((min(real(n, kind=c_double), real(m, kind=c_double))), kind=c_ptrdiff_t))
34+
real(c_double), intent(out) :: out(int((min(real(n, kind=c_double), real(m, kind=c_double))), kind=c_ptrdiff_t))
3535
3636
! locals
3737
integer(c_int) :: i

tests/testthat/_snaps/dims2c-length.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@
166166
cat(fsub)
167167
Output
168168
subroutine fn(n, m, out) bind(c)
169-
use iso_c_binding, only: c_double, c_int
169+
use iso_c_binding, only: c_double, c_int, c_ptrdiff_t
170170
implicit none
171171
172172
! manifest start
173173
! args
174174
integer(c_int), intent(in) :: n
175175
integer(c_int), intent(in) :: m
176-
real(c_double), intent(out) :: out(min(n, m))
176+
real(c_double), intent(out) :: out(int((min(real(n, kind=c_double), real(m, kind=c_double))), kind=c_ptrdiff_t))
177177
178178
! locals
179179
integer(c_int) :: i
@@ -255,14 +255,14 @@
255255
cat(fsub)
256256
Output
257257
subroutine fn(n, m, out) bind(c)
258-
use iso_c_binding, only: c_double, c_int
258+
use iso_c_binding, only: c_double, c_int, c_ptrdiff_t
259259
implicit none
260260
261261
! manifest start
262262
! args
263263
integer(c_int), intent(in) :: n
264264
integer(c_int), intent(in) :: m
265-
real(c_double), intent(out) :: out(max(n, m))
265+
real(c_double), intent(out) :: out(int((max(real(n, kind=c_double), real(m, kind=c_double))), kind=c_ptrdiff_t))
266266
267267
! locals
268268
integer(c_int) :: i

tests/testthat/_snaps/qr-solve.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
cat(fsub)
2020
Output
2121
subroutine fn(a, b, out_, a__dim_1_, a__dim_2_, quickr_err_msg) bind(c)
22-
use iso_c_binding, only: c_char, c_double, c_int, c_null_char
22+
use iso_c_binding, only: c_char, c_double, c_int, c_null_char, c_ptrdiff_t
2323
implicit none
2424
2525
! manifest start
@@ -54,7 +54,7 @@
5454
allocate(btmp3_(a__dim_2_))
5555
allocate(btmp4_(a__dim_2_))
5656
allocate(btmp5_(a__dim_2_, 2))
57-
allocate(btmp8_(min(a__dim_1_, a__dim_2_), 1))
57+
allocate(btmp8_(int((min(real(a__dim_1_, kind=c_double), real(a__dim_2_, kind=c_double))), kind=c_ptrdiff_t), 1))
5858
btmp1_ = a
5959
btmp2_ = 0.0_c_double
6060
btmp2_(1:a__dim_1_, 1) = b
@@ -181,7 +181,7 @@
181181
cat(fsub)
182182
Output
183183
subroutine fn(a, b, out_, a__dim_1_, a__dim_2_, b__dim_2_, quickr_err_msg) bind(c)
184-
use iso_c_binding, only: c_char, c_double, c_int, c_null_char
184+
use iso_c_binding, only: c_char, c_double, c_int, c_null_char, c_ptrdiff_t
185185
implicit none
186186
187187
! manifest start
@@ -218,7 +218,7 @@
218218
allocate(btmp3_(a__dim_2_))
219219
allocate(btmp4_(a__dim_2_))
220220
allocate(btmp5_(a__dim_2_, 2))
221-
allocate(btmp8_(min(a__dim_1_, a__dim_2_), b__dim_2_))
221+
allocate(btmp8_(int((min(real(a__dim_1_, kind=c_double), real(a__dim_2_, kind=c_double))), kind=c_ptrdiff_t), b__dim_2_))
222222
btmp1_ = a
223223
btmp2_ = 0.0_c_double
224224
btmp2_(1:a__dim_1_, 1:b__dim_2_) = b

0 commit comments

Comments
 (0)