Skip to content

Commit 817e711

Browse files
author
ripley
committed
add 2025 BLAS sources
git-svn-id: https://svn.r-project.org/R/trunk@87891 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 738ba03 commit 817e711

File tree

24 files changed

+1283
-281
lines changed

24 files changed

+1283
-281
lines changed

src/include/Defn.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ int Rf_FixupDigits(SEXP, warn_type);
17141714
int Rf_FixupWidth (SEXP, warn_type);
17151715
SEXP Rf_installDDVAL(int i);
17161716
SEXP Rf_installS3Signature(const char *, const char *);
1717-
Rboolean Rf_isFree(SEXP);
1717+
bool Rf_isFree(SEXP);
17181718
Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env);
17191719
SEXP Rf_matchE(SEXP, SEXP, int, SEXP);
17201720
// void Rf_setSVector(SEXP*, int, SEXP);
@@ -1914,8 +1914,8 @@ int R_ShowFiles(int, const char **, const char **, const char *,
19141914
int R_EditFiles(int, const char **, const char **, const char *);
19151915
int R_ChooseFile(int, char *, int);
19161916
char *R_HomeDir(void);
1917-
Rboolean R_FileExists(const char *);
1918-
Rboolean R_HiddenFile(const char *);
1917+
bool R_FileExists(const char *);
1918+
bool R_HiddenFile(const char *);
19191919
double R_FileMtime(const char *);
19201920
int R_GetFDLimit(void);
19211921
int R_EnsureFDLimit(int);
@@ -2284,7 +2284,7 @@ int utf8clen(char c);
22842284
int Rf_AdobeSymbol2ucs2(int n);
22852285
double R_strtod5(const char *str, char **endptr, char dec,
22862286
Rboolean NA, int exact);
2287-
SEXP R_listCompact(SEXP s, Rboolean keep_initial);
2287+
SEXP R_listCompact(SEXP s, bool keep_initial);
22882288

22892289
typedef unsigned short R_ucs2_t;
22902290
size_t mbcsToUcs2(const char *in, R_ucs2_t *out, int nout, int enc);
@@ -2321,7 +2321,7 @@ int Rasprintf_malloc(char **str, const char *fmt, ...)
23212321

23222322
SEXP fixup_NaRm(SEXP args); /* summary.c */
23232323
void invalidate_cached_recodings(void); /* from sysutils.c */
2324-
void resetICUcollator(Rboolean disable); /* from util.c */
2324+
void resetICUcollator(bool disable); /* from util.c */
23252325
void dt_invalidate_locale(void); /* from Rstrptime.h */
23262326
extern int R_OutputCon; /* from connections.c */
23272327

src/main/complex.c

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* R : A Computer Language for Statistical Data Analysis
3-
* Copyright (C) 2000-2022 The R Core Team
3+
* Copyright (C) 2000-2025 The R Core Team
44
* Copyright (C) 2005 The R Foundation
55
* Copyright (C) 1995-1997 Robert Gentleman and Ross Ihaka
66
*
@@ -585,18 +585,18 @@ static double complex z_atanh(double complex z)
585585
return -I * z_atan(z * I);
586586
}
587587

588-
static Rboolean cmath1(double complex (*f)(double complex),
588+
static bool cmath1(double complex (*f)(double complex),
589589
const Rcomplex *x, Rcomplex *y, R_xlen_t n)
590590
{
591591
R_xlen_t i;
592-
Rboolean naflag = FALSE;
592+
bool naflag = false;
593593
for (i = 0 ; i < n ; i++) {
594594
if (ISNA(x[i].r) || ISNA(x[i].i)) {
595595
y[i].r = NA_REAL; y[i].i = NA_REAL;
596596
} else {
597597
SET_C99_COMPLEX(y, i, f(toC99(x + i)));
598598
if ( (ISNAN(y[i].r) || ISNAN(y[i].i)) &&
599-
!(ISNAN(x[i].r) || ISNAN(x[i].i)) ) naflag = TRUE;
599+
!(ISNAN(x[i].r) || ISNAN(x[i].i)) ) naflag = true;
600600
}
601601
}
602602
return naflag;
@@ -606,7 +606,7 @@ attribute_hidden SEXP complex_math1(SEXP call, SEXP op, SEXP args, SEXP env)
606606
{
607607
SEXP x, y;
608608
R_xlen_t n;
609-
Rboolean naflag = FALSE;
609+
bool naflag = false;
610610

611611
PROTECT(x = CAR(args));
612612
n = XLENGTH(x);
@@ -696,7 +696,7 @@ attribute_hidden SEXP complex_math2(SEXP call, SEXP op, SEXP args, SEXP env)
696696
Rcomplex ai, bi, *y;
697697
const Rcomplex *a, *b;
698698
SEXP sa, sb, sy;
699-
Rboolean naflag = FALSE;
699+
bool naflag = false;
700700
cm2_fun f;
701701

702702
switch (PRIMVAL(op)) {
@@ -734,7 +734,7 @@ attribute_hidden SEXP complex_math2(SEXP call, SEXP op, SEXP args, SEXP env)
734734
f(&y[i], &ai, &bi);
735735
if ( (ISNAN(y[i].r) || ISNAN(y[i].i)) &&
736736
!(ISNAN(ai.r) || ISNAN(ai.i) || ISNAN(bi.r) || ISNAN(bi.i)) )
737-
naflag = TRUE;
737+
naflag = true;
738738
}
739739
});
740740
if (naflag)
@@ -787,12 +787,12 @@ attribute_hidden SEXP do_complex(SEXP call, SEXP op, SEXP args, SEXP rho)
787787
}
788788

789789
static void R_cpolyroot(double *opr, double *opi, int *degree,
790-
double *zeror, double *zeroi, Rboolean *fail);
790+
double *zeror, double *zeroi, bool *fail);
791791

792792
attribute_hidden SEXP do_polyroot(SEXP call, SEXP op, SEXP args, SEXP rho)
793793
{
794794
SEXP z, zr, zi, r, rr, ri;
795-
Rboolean fail;
795+
bool fail;
796796
int degree, i, n;
797797

798798
checkArity(op, args);
@@ -904,10 +904,10 @@ attribute_hidden SEXP do_polyroot(SEXP call, SEXP op, SEXP args, SEXP rho)
904904

905905
#include <Rmath.h> /* for R_pow_di */
906906

907-
static void calct(Rboolean *);
908-
static Rboolean fxshft(int, double *, double *);
909-
static Rboolean vrshft(int, double *, double *);
910-
static void nexth(Rboolean);
907+
static void calct(bool *);
908+
static bool fxshft(int, double *, double *);
909+
static bool vrshft(int, double *, double *);
910+
static void nexth(bool);
911911
static void noshft(int);
912912

913913
static void polyev(int, double, double,
@@ -931,30 +931,30 @@ static const double mre = 2. * M_SQRT2 * /* eta, i.e. */DBL_EPSILON;
931931
static const double infin = DBL_MAX;
932932

933933
static void R_cpolyroot(double *opr, double *opi, int *degree,
934-
double *zeror, double *zeroi, Rboolean *fail)
934+
double *zeror, double *zeroi, bool *fail)
935935
{
936936
static const double smalno = DBL_MIN;
937937
static const double base = (double)FLT_RADIX;
938938
static int d_n, i, i1, i2;
939939
static double zi, zr, xx, yy;
940940
static double bnd, xxx;
941-
Rboolean conv;
941+
bool conv;
942942
int d1;
943943
double *tmp;
944944
static const double cosr =/* cos 94 */ -0.06975647374412529990;
945945
static const double sinr =/* sin 94 */ 0.99756405025982424767;
946946
xx = M_SQRT1_2;/* 1/sqrt(2) = 0.707.... */
947947

948948
yy = -xx;
949-
*fail = FALSE;
949+
*fail = false;
950950

951951
nn = *degree;
952952
d1 = nn - 1;
953953

954954
/* algorithm fails if the leading coefficient is zero. */
955955

956956
if (opr[0] == 0. && opi[0] == 0.) {
957-
*fail = TRUE;
957+
*fail = true;
958958
return;
959959
}
960960

@@ -1037,7 +1037,7 @@ static void R_cpolyroot(double *opr, double *opi, int *degree,
10371037
/* the zerofinder has failed on two major passes */
10381038
/* return empty handed */
10391039

1040-
*fail = TRUE;
1040+
*fail = true;
10411041
vmaxset(vmax);
10421042
return;
10431043

@@ -1113,7 +1113,7 @@ static void noshft(int l1)
11131113
* initiates a variable-shift iteration and returns with the
11141114
* approximate zero if successful.
11151115
*/
1116-
static Rboolean fxshft(int l2, double *zr, double *zi)
1116+
static bool fxshft(int l2, double *zr, double *zi)
11171117
{
11181118
/* l2 - limit of fixed shift steps
11191119
* zr,zi - approximate zero if convergence (result TRUE)
@@ -1123,7 +1123,7 @@ static Rboolean fxshft(int l2, double *zr, double *zi)
11231123
* Uses global (sr,si), nn, pr[], pi[], .. (all args of polyev() !)
11241124
*/
11251125

1126-
Rboolean pasd, h_s_0, test;
1126+
bool pasd, h_s_0, test;
11271127
static double svsi, svsr;
11281128
static int i, j, n;
11291129
static double oti, otr;
@@ -1134,8 +1134,8 @@ static Rboolean fxshft(int l2, double *zr, double *zi)
11341134

11351135
polyev(nn, sr, si, pr, pi, qpr, qpi, &pvr, &pvi);
11361136

1137-
test = TRUE;
1138-
pasd = FALSE;
1137+
test = true;
1138+
pasd = false;
11391139

11401140
/* calculate first t = -p(s)/h(s). */
11411141

@@ -1160,10 +1160,10 @@ static Rboolean fxshft(int l2, double *zr, double *zi)
11601160

11611161
if (!h_s_0 && test && j != l2) {
11621162
if (hypot(tr - otr, ti - oti) >= hypot(*zr, *zi) * 0.5) {
1163-
pasd = FALSE;
1163+
pasd = false;
11641164
}
11651165
else if (! pasd) {
1166-
pasd = TRUE;
1166+
pasd = true;
11671167
}
11681168
else {
11691169

@@ -1179,14 +1179,14 @@ static Rboolean fxshft(int l2, double *zr, double *zi)
11791179
svsr = sr;
11801180
svsi = si;
11811181
if (vrshft(10, zr, zi)) {
1182-
return TRUE;
1182+
return true;
11831183
}
11841184

11851185
/* the iteration failed to converge. */
11861186
/* turn off testing and restore */
11871187
/* h, s, pv and t. */
11881188

1189-
test = FALSE;
1189+
test = false;
11901190
for (i=1 ; i<=n ; i++) {
11911191
hr[i-1] = shr[i-1];
11921192
hi[i-1] = shi[i-1];
@@ -1208,7 +1208,7 @@ static Rboolean fxshft(int l2, double *zr, double *zi)
12081208

12091209
/* carries out the third stage iteration.
12101210
*/
1211-
static Rboolean vrshft(int l3, double *zr, double *zi)
1211+
static bool vrshft(int l3, double *zr, double *zi)
12121212
{
12131213
/* l3 - limit of steps in stage 3.
12141214
* zr,zi - on entry contains the initial iterate;
@@ -1218,12 +1218,12 @@ static Rboolean vrshft(int l3, double *zr, double *zi)
12181218
*
12191219
* Assign and uses GLOBAL sr, si
12201220
*/
1221-
Rboolean h_s_0, b;
1221+
bool h_s_0, b;
12221222
static int i, j;
12231223
static double r1, r2, mp, ms, tp, relstp;
12241224
static double omp;
12251225

1226-
b = FALSE;
1226+
b = false;
12271227
sr = *zr;
12281228
si = *zi;
12291229

@@ -1254,7 +1254,7 @@ static Rboolean vrshft(int l3, double *zr, double *zi)
12541254
/* one zero to dominate. */
12551255

12561256
tp = relstp;
1257-
b = TRUE;
1257+
b = true;
12581258
if (relstp < eta)
12591259
tp = eta;
12601260
r1 = sqrt(tp);
@@ -1275,7 +1275,7 @@ static Rboolean vrshft(int l3, double *zr, double *zi)
12751275
/* increases significantly. */
12761276

12771277
if (mp * .1 > omp)
1278-
return FALSE;
1278+
return false;
12791279
}
12801280
}
12811281
omp = mp;
@@ -1292,15 +1292,15 @@ static Rboolean vrshft(int l3, double *zr, double *zi)
12921292
si += ti;
12931293
}
12941294
}
1295-
return FALSE;
1295+
return false;
12961296

12971297
L_conv:
12981298
*zr = sr;
12991299
*zi = si;
1300-
return TRUE;
1300+
return true;
13011301
}
13021302

1303-
static void calct(Rboolean *h_s_0)
1303+
static void calct(bool *h_s_0)
13041304
{
13051305
/* computes t = -p(s)/h(s).
13061306
* h_s_0 - logical, set true if h(s) is essentially zero. */
@@ -1322,7 +1322,7 @@ static void calct(Rboolean *h_s_0)
13221322
}
13231323
}
13241324

1325-
static void nexth(Rboolean h_s_0)
1325+
static void nexth(bool h_s_0)
13261326
{
13271327
/* calculates the next shifted h polynomial.
13281328
* h_s_0 : if TRUE h(s) is essentially zero

src/main/identical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ attribute_hidden SEXP do_identical(SEXP call, SEXP op, SEXP args, SEXP env)
103103
#define EXTPTR_AS_REF (flags & IDENT_EXTPTR_AS_REF)
104104

105105
/* do the two objects compute as identical?
106-
Also used in unique.c */
106+
Also used in unique.c, eval.c, relop.c, dotcode.c, and exported */
107107
Rboolean
108108
R_compute_identical(SEXP x, SEXP y, int flags)
109109
{

src/main/objects.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ static SEXP inherits3(SEXP x, SEXP what, SEXP which)
10281028

10291029
if( !isLogical(which) || (LENGTH(which) != 1) )
10301030
error(_("'which' must be a length 1 logical vector"));
1031-
Rboolean isvec = asRbool(which, R_NilValue);
1031+
bool isvec = asRbool(which, R_NilValue);
10321032

10331033
if(isvec)
10341034
PROTECT(rval = allocVector(INTSXP, nwhat));
@@ -1231,7 +1231,7 @@ static SEXP R_isMethodsDispatchOn(SEXP onOff)
12311231
R_stdGen_ptr_t old = R_get_standardGeneric_ptr();
12321232
int ival = !NOT_METHODS_DISPATCH_PTR(old);
12331233
if(length(onOff) > 0) {
1234-
Rboolean onOffValue = asRbool(onOff, R_NilValue);
1234+
bool onOffValue = asRbool(onOff, R_NilValue);
12351235
if(onOffValue == NA_INTEGER)
12361236
error(_("'onOff' must be TRUE or FALSE"));
12371237
else if(onOffValue == FALSE)
@@ -1782,7 +1782,7 @@ SEXP R_do_new_object(SEXP class_def)
17821782
}
17831783
PROTECT(e = R_do_slot(class_def, s_className));
17841784
PROTECT(value = duplicate(R_do_slot(class_def, s_prototype)));
1785-
Rboolean xDataType = TYPEOF(value) == ENVSXP || TYPEOF(value) == SYMSXP ||
1785+
bool xDataType = TYPEOF(value) == ENVSXP || TYPEOF(value) == SYMSXP ||
17861786
TYPEOF(value) == EXTPTRSXP;
17871787
if((TYPEOF(value) == OBJSXP || getAttrib(e, R_PackageSymbol) != R_NilValue) &&
17881788
!xDataType)

src/main/plot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ SEXP CreateAtVector(double axp[], const double usr[], int nint, Rboolean logflag
8686
}
8787
}
8888
else { /* ------ log axis ----- */
89-
Rboolean reversed = FALSE;
89+
bool reversed = false;
9090
double
9191
umin = usr[0],
9292
umax = usr[1];

0 commit comments

Comments
 (0)