Commit 2d6ffa91 authored by Radford Neal's avatar Radford Neal

fixes and documentation updates

parent 2a8738b9
......@@ -54,27 +54,6 @@ likely to be useful are as follows:
hyperthreading. It is necessary if your system does not
support the OpenMP facility.
--disable-BLAS-in-helpers
Specify this option if the BLAS routines you plan to use are
not thread-safe, and hence should not be run in parallel. The
BLAS routines supplied with pqR are thread-safe, so this is
not the default.
--enable-mat-mult-with-BLAS-by-default
Specify this if by default you want matrix multiply operations
in R code to be done with whatever BLAS you supply (or the one
supplied with pqR), rather than the C routines built into pqR.
Your BLAS may be faster than the builtin C routines, but on
the other hand, the builtin C routines guarantee that NA, Inf,
etc. are propagated correctly, and will pipeline output to
other operations when run in parallel. This option specifies
only the default, which can be changed using "options" (see
help("%*%") for details). Note that matrix multiplies done as
part of other operations (eg, eigenvector computations) are
always done with the BLAS.
--disable-byte-compiled-packages
Disables byte compilation for the builtin and recommended
......@@ -89,6 +68,45 @@ likely to be useful are as follows:
Build R as a shared library. This is necessary if you want to
use RStudio.
--with-blas=...
Used to specify that an external BLAS package should be used
rather than the built-in BLAS supplied with pqR. See R-admin
for details.
BLAS_in_helpers=TRUE
Specify this option if you use the --with-blas option to link
to BLAS routines other the ones built into pqR, and these
routines are thread-safe, and hence may be run in parallel.
This is the default if no --with-blas argument is specified,
since the BLAS routines supplied with pqR are thread-safe, but
an external BLAS is assumed to not be thread-safe if this
option is not given. You might need BLAS_in_helpers=FALSE if
you're not specifying an external BLAS now, but might later
substitute a non-thread-safe BLAS (as is possible if the BLAS
is a shared library, as it is by default).
mat-mult-with-BLAS=TRUE
Specify this if by default you want matrix multiply operations
in R code to always be done with whatever BLAS you supply (or
the one supplied with pqR), rather than the C routines built
into pqR. Your BLAS may be faster than the built-in C
routines, but on the other hand, the built-in C routines
guarantee that NA, Inf, etc. are propagated correctly, and
will pipeline output to other operations when run in parallel.
This option specifies only the default, which can be changed
using "options" (see help("%*%") and help(options) for
details). Note that matrix multiplies done as part of other
operations are always done with the BLAS. The default setting
for this option is FALSE if no --with-blas argument is given
to configure, and NA if --with-blas is specified. A value of
NA specifies that the BLAS routines should only be used for
large matrix-matrix multiplies, and only if the operands do
not have elements that are NA or NaN (see help("%*%") for
details).
R_PAPERSIZE=letter
Sets the default paper size to 8 1/2 by 11 inch letter size.
......@@ -96,14 +114,17 @@ likely to be useful are as follows:
North Americans.
CC=...
CXX=...
FC=...
F77=...
Specifies which compilers to use for C, Fortran 90/95, and
Fortran 77. Suitable compilers may be chosen automatically,
but the GNU compilers can be specified as follows:
Specifies which compilers to use for C, C++, Fortran 90/95,
and Fortran 77. Suitable compilers may be chosen
automatically, but the GNU compilers can be specified as
follows:
CC='gcc -std=gnu99'
CXX='g++'
FC='gfortran'
F77='gfortran'
......@@ -111,6 +132,8 @@ likely to be useful are as follows:
on a 64-bit system.
CFLAGS=...
CXXFLAGS=...
FCFLAGS=...
FFLAGS=...
Sets the compiler flags for C and Fortran. If the GNU
......@@ -118,11 +141,13 @@ likely to be useful are as follows:
following flags are recommended:
CFLAGS='-g -O2 -mtune=native -DENABLE_ISNAN_TRICK'
CXXLAGS='-g -O2 -mtune=native'
FCLAGS='-g -O2 -mtune=native'
FFLAGS='-g -O2 -mtune=native'
For a 32-bit build, adding the -mfpmath=sse option is probably
desirable (unless you have a very old processor, Pentium III
or earlier).
or earlier, that lacks the SSE2 instructions).
Compiling pqR
......@@ -161,13 +186,14 @@ be run with
make check-all
Some discrepancies are typically shown in the output of these
commands, because floating-point arithmetic differs slightly from one
computer to another, because the exact form of error messages may
differ depending on whether a package was byte compiled or not, and
because some output depends on the set of files present, etc.
However, any report of "ERROR" or "FAILED" that appears indicates a
problem, except if it is due to lack of internet access, or to running
the checks in a C/POSIX locale.
commands, because floating-point round-off errors and sizes of objects
differ from one computer to another (including 32-bit versus 64-bit
builds), because the exact form of error messages may differ depending
on whether a package was byte compiled or not, and because some output
depends on the current date, the set of files present, etc. However,
any report of "ERROR" or "FAILED" that appears indicates a problem,
except if it is due to lack of internet access, or to running the
checks in a C/POSIX locale.
Running and installing pqR
......@@ -200,7 +226,8 @@ run the command
./create-configure
You can then proceed as described above. However, note that the
release date may not be set to anything meaningful. Also, the
descriptions of the modifications done to create pqR will be in files
in the "mods" directory, rather than the single file "MODS".
If this succeeds (it may not if you lack some system facilities), you
can then proceed as described above. However, note that the release
date may not be set to anything meaningful. Also, the descriptions of
the modifications done to create pqR will be in files in the "mods"
directory, rather than the single file "MODS".
......@@ -299,63 +299,6 @@ if test "${want_R_framework}" != no; then
fi
## BLAS matrix multiply options.
m4_divert_once([HELP_BEGIN], [
Defaults for options regarding BLAS usage:
mat_mult_with_BLAS Default for mat_mult_with_BLAS @<:@NA if --with-blas, else F@:>@
BLAS_in_helpers Default for BLAS_in_helpers @<:@F if --with-blas, else T@:>@])dnl
if test "x${with-blas}" = x; then
if test "x${mat_mult_with_BLAS}" = x; then
mat_mult_with_BLAS=FALSE
fi
if test "x${BLAS_in_helpers}" = x; then
BLAS_in_helpers=TRUE
fi
else
if test "x${mat_mult_with_BLAS}" = x; then
mat_mult_with_BLAS=NA
fi
if test "x${BLAS_in_helpers}" = x; then
BLAS_in_helpers=FALSE
fi
fi
if test "${mat_mult_with_BLAS}" != TRUE -a \
"${mat_mult_with_BLAS}" != FALSE -a \
"${mat_mult_with_BLAS}" != T -a \
"${mat_mult_with_BLAS}" != F -a \
"${mat_mult_with_BLAS}" != NA; then
if test "${mat_mult_with_BLAS}" = T; then
mat_mult_with_BLAS=TRUE
fi
if test "${mat_mult_with_BLAS}" = F; then
mat_mult_with_BLAS=FALSE
fi
AC_MSG_ERROR([Invalid value for mat_mult_with_BLAS: ${mat_mult_with_BLAS}])
else
AC_DEFINE_UNQUOTED(R_MAT_MULT_WITH_BLAS_DEFAULT, ${mat_mult_with_BLAS},
[Define this to the default for mat_mult_with_BLAS.])
fi
if test "${BLAS_in_helpers}" != TRUE -a \
"${BLAS_in_helpers}" != FALSE -a
"${BLAS_in_helpers}" != T -a \
"${BLAS_in_helpers}" != F; then
AC_MSG_ERROR([Invalid value for BLAS_in_helpers: ${BLAS_in_helpers}])
else
if test "${BLAS_in_helpers}" = T; then
BLAS_in_helpers=TRUE
fi
if test "${BLAS_in_helpers}" = F; then
BLAS_in_helpers=FALSE
fi
AC_DEFINE_UNQUOTED(R_BLAS_IN_HELPERS_DEFAULT, ${BLAS_in_helpers},
[Define this to the default for BLAS_in_helpers.])
fi
AM_CONDITIONAL(WANT_R_FRAMEWORK, [test "x${want_R_framework}" = xyes])
## Allow the user to specify building R as a shared library.
......@@ -568,6 +511,63 @@ AC_ARG_ENABLE([byte-compiled-packages],
AM_CONDITIONAL(BYTE_COMPILE_PACKAGES,
[test "x${want_byte_compiled_packages}" = xyes])
## BLAS matrix multiply options.
m4_divert_once([HELP_BEGIN], [
Defaults for options regarding BLAS usage:
mat_mult_with_BLAS=v Default mat_mult_with_BLAS @<:@NA if --with-blas, else F@:>@
BLAS_in_helpers=v Default BLAS_in_helpers @<:@F if --with-blas, else T@:>@])dnl
if test "${use_blas}" = unset; then
if test "x${mat_mult_with_BLAS}" = x; then
mat_mult_with_BLAS=FALSE
fi
if test "x${BLAS_in_helpers}" = x; then
BLAS_in_helpers=TRUE
fi
else
if test "x${mat_mult_with_BLAS}" = x; then
mat_mult_with_BLAS=NA
fi
if test "x${BLAS_in_helpers}" = x; then
BLAS_in_helpers=FALSE
fi
fi
if test "${mat_mult_with_BLAS}" != TRUE -a \
"${mat_mult_with_BLAS}" != FALSE -a \
"${mat_mult_with_BLAS}" != T -a \
"${mat_mult_with_BLAS}" != F -a \
"${mat_mult_with_BLAS}" != NA; then
if test "${mat_mult_with_BLAS}" = T; then
mat_mult_with_BLAS=TRUE
fi
if test "${mat_mult_with_BLAS}" = F; then
mat_mult_with_BLAS=FALSE
fi
AC_MSG_ERROR([Invalid value for mat_mult_with_BLAS: ${mat_mult_with_BLAS}])
else
AC_DEFINE_UNQUOTED(R_MAT_MULT_WITH_BLAS_DEFAULT, ${mat_mult_with_BLAS},
[Define this to the default for mat_mult_with_BLAS.])
fi
if test "${BLAS_in_helpers}" != TRUE -a \
"${BLAS_in_helpers}" != FALSE -a \
"${BLAS_in_helpers}" != T -a \
"${BLAS_in_helpers}" != F; then
AC_MSG_ERROR([Invalid value for BLAS_in_helpers: ${BLAS_in_helpers}])
else
if test "${BLAS_in_helpers}" = T; then
BLAS_in_helpers=TRUE
fi
if test "${BLAS_in_helpers}" = F; then
BLAS_in_helpers=FALSE
fi
AC_DEFINE_UNQUOTED(R_BLAS_IN_HELPERS_DEFAULT, ${BLAS_in_helpers},
[Define this to the default for BLAS_in_helpers.])
fi
### ** Precious variables.
AC_ARG_VAR([R_PRINTCMD],
......@@ -2917,6 +2917,7 @@ R is now configured for ${host}
Byte compile packages: ${want_byte_compiled_packages}
Recommended packages: ${use_recommended_packages}
use_blas: ${use_blas}
acx_blas_ok: ${acx_blas_ok}
BLAS_LIBS: ${BLAS_LIBS}
BLAS_LIBS0: ${BLAS_LIBS0}
......
......@@ -3513,11 +3513,18 @@ produce a further slight speed improvement in situations where neither
helper threads nor task merging are useful.
If the BLAS routines used for matrix multiplication are not
thread-safe, the @code{--disable-BLAS-in-helpers} option should be
used, to prevent tasks that call the BLAS from being run in helper
threads. This option may also be useful if the BLAS is multi-threaded
and runs inefficiently (even if correctly) when several BLAS routines
are running in parallel.
thread-safe, the @code{BLAS_in_helpers=FALSE} option (whose default
can be set by @code{configure}) should be used, to prevent tasks that
call the BLAS from being run in helper threads. This option may also
be useful if the BLAS is multi-threaded and runs inefficiently (even
if correctly) when several BLAS routines are running in parallel. You
may also want to set the @code{mat_mult_with_BLAS} option as desired.
The defaults for these options are @code{BLAS_in_helpers=FALSE} and
@code{mat_mult_with_BLAS=NA} when @code{--with-blas} is given as an
argument to @code{configure}, and @code{BLAS_in_helpers=TRUE} and
@code{mat_mult_with_BLAS=FALSE} when there is no @code{--with-blas}
argument. See @code{help(options)} for more on the meaning of these
options.
@node Internationalization support, Configuration variables, Helper threads and task merging, Configuration on a Unix-alike
......
......@@ -39,16 +39,18 @@ tcrossprod(x, y = NULL)
The multiplication is done either by a BLAS routine or by a C routine,
in the same way as for \code{\link{\%*\%}}, based on the setting of
the \code{mat_mult_with_BLAS} option, except that a \code{NA}
value for \code{mat_mult_with_BLAS} is always equivalent to
\code{FALSE} for \code{crossprod} and \code{tcrossprod}.
value for the fourth element of the \code{mat_mult_with_BLAS} option
(pertaining to matrix-matrix multiplies) is always equivalent to
\code{TRUE} for \code{crossprod} and \code{tcrossprod} (thereby
mimicking the behaviour of R Core releases to at least R-3.1.1).
When the C routines are used for the multiplication, and helper
threads are enabled, \code{crossprod} and \code{tcrossprod} will
produce pipelined output, and \code{crossprod} but not
\code{tcrossprod} will take pipelined input for the second operand.
When a BLAS routine is used, the multiplication can be done in a
helper thread (unless this is disabled with \code{--disable-BLAS-in-helpers}
when configuring pqR), but with no pipelining of inputs or output.
helper thread (if allowed by the \code{BLAS_in_helpers} option),
but with no pipelining of inputs or output.
When \code{crossprod} or \code{tcrossprod} is given only one
argument (the second defaulting to be the same as the first), or when the
......
......@@ -37,59 +37,95 @@ x \%*\% y
With the default real or complex method, when a vector is promoted
to a matrix, its names are not promoted to row or column names,
unlike \code{\link{as.matrix}}.
}
\value{
A double or complex matrix product. Use \code{\link{drop}} to remove
dimensions which have only one level.
}
The default method for real matrices uses either built-in C routines
or the appropriate BLAS routine, as controlled by the
\code{mat_mult_with_BLAS} option (see below).
The default is to use the builtin C routines for all operations,
unless the \code{--enable-mat-mult-with-BLAS-by-default} option is used
when configuring pqR.
\section{BLAS versus C routines}{
The default method for \code{\%*\%} on real matrices uses either a
built-in C routine or the appropriate BLAS routine, as controlled
by the \code{mat_mult_with_BLAS} option (see below), as set by
default or by using \code{\link{options}}.
The built-in C routines guarantee correct behaviour when some
elements are \code{NA}, \code{NaN}, or infinite, which may not be
the case with all BLAS packages. Also, the order of addition in the
C routines is the same as for the obvious matrix multiplication
algorithm, whereas it may differ in some BLAS implementations, which
affects roundoff errors.
If the builtin C routines are used when helper threads are enabled,
they will take piplelined input for their second operand, and
produce pipelined output for vector-matrix and matrix-matrix
products. Matrix multiplication with the BLAS routines can also be
done in helper threads (though this can be disabled when configuring
pqR with the \code{--disable-BLAS-in-helpers} option), but with no
pipelining of inputs or output.
Another reason one might wish to use the built-in C routines is that
they guarantee correct behaviour when some elements are \code{NA},
\code{NaN}, or infinite, which may not be the case with all BLAS
packages. Also, the order of addition in the C routines is the same
as for the obvious matrix multiplication algorithm, whereas it may
differ in some BLAS implementations, which affects roundoff errors.
It's also conceivable that a built-in C routine might be
faster than the corresponding BLAS routine.
products. Matrix multiplication with the BLAS routines may also be
done in helper threads, depending on the \code{BLAS_in_helpers}
option (see below), but with no pipelining of inputs or output.
The default method for complex matrices uses a BLAS routine, unless
such a routine does not exist because Fortran double complex values
are not supported, in which case a C routine is used.
The built-in C routines are sometimes slightly faster than the BLAS
routines supplied with pqR, but are likely slower (at least for
large matrix-matrix products) than the routines in whatever
optimized BLAS you may have available. This holds even if only a
single processor core is used by the BLAS, more so if it uses
multiple cores. However, if helper threads are used, it is possible
that the benefit of pipelining done by the C routines is greater
than any gain from using a more optimized BLAS, especially for
vector-vector, vector-matrix, and matrix-vector multiplies.
Note that some other linear algebra operations make use internally
of the BLAS matrix multiply routines, regardless of how the
\code{mat_mult_with_BLAS} option is set.
The \code{mat_mult_with_BLAS} option is a vector of four
logical values, specifying whether a BLAS routine should be used
when the operands of \code{\%*\%} result in the operation being a
vector dot product, a product of a matrix and column vector, a
product of a row vector and a matrix, or a general matrix-matrix
product. A value of \code{NA} is the same as \code{FALSE} except
The \code{mat_mult_with_BLAS} option is a vector of four logical
values, specifying whether a BLAS routine should be used when the
operands of \code{\%*\%} result in the operation being a vector dot
product, a product of a matrix and column vector, a product of a row
vector and a matrix, or a general matrix-matrix product. (Setting
this option to a single logical value sets all four of these
values.) A value of \code{NA} is the same as \code{FALSE} except
for matrix-matrix multiplies, for which the BLAS is used except when
an operand contains an \code{NA} or \code{NaN} value (or the operands
are of a size where checking this takes time comparable to just
doing the operation with the C routines). Setting \code{mat_mult_with_BLAS}
to \code{NA} therefore gives the same effect as R Core releases
(at least to R-3.1.1), but without the substantial inefficiency
that R Core releases incur from checking for \code{NA} or \code{NaN}
values even when this takes more time than the multiply itself.
an operand contains an \code{NA} or \code{NaN} value, or the
operands are of a size where checking this takes time comparable to
just doing the operation with the C routines. Setting
\code{mat_mult_with_BLAS} to \code{NA} therefore gives the same
effect as R Core releases (at least to R-3.1.1), but without the
substantial inefficiency that R Core releases incur from checking
for \code{NA} or \code{NaN} values even when this check takes more
time than the multiply itself.
The default settings of the \code{mat_mult_with_BLAS} option is
determined by the configuration options when pqR is built. It can be
set by a \code{mat_mult_with_BLAS=X} argument to \code{configure},
where \code{X} is \code{NA}, \code{TRUE}, or \code{FALSE} (or
\code{T} or \code{F}). If no such argument is present, \code{NA} is
assumed if a \code{--with-blas} argument is given to
\code{configure}, and \code{FALSE} is assumed if there is no
\code{--with-blas} argument.
The default setting of the \code{BLAS_in_helpers} option is also
determined by \code{configure} when pqR is built. It can be set by
a \code{BLAS_in_helpers=X} argument, where \code{X} is \code{TRUE}
or \code{FALSE} (or \code{T} or \code{F}). If no such argument is
present, \code{FALSE} is assumed if a \code{--with-blas} argument is
given to \code{configure}, and \code{TRUE} is assumed if there is no
\code{--with-blas} argument.
If the default setting of \code{BLAS_in_helpers} determined by
\code{configure} is \code{FALSE}, attempts to change this option
with \code{options} are silently ignored. This is appropriate if
the BLAS is not thread-safe, and hence calling a BLAS routine in a
helper thread could produce incorrect results, or result in a crash.
If the default setting of \code{BLAS_in_helpers} is \code{TRUE}, it
can be changed to \code{FALSE} (and later back to \code{TRUE}) using
\code{options}.
The default method for complex matrices uses a BLAS routine, unless
such a routine does not exist because Fortran double complex values
are not supported, in which case a C routine is used.
}
\value{
A double or complex matrix product. Use \code{\link{drop}} to remove
dimensions which have only one level.
}
\references{
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
......
......@@ -63,6 +63,15 @@ getOption(x, default = NULL)
many (simulated) smooths should be added. This is currently only
used by \code{\link{plot.lm}}.}
\item{\code{BLAS_in_helpers}:}{logical: whether BLAS routines may
be run in helper threads. The default for this option is set by
configure when pqR is built, with the default setting being
\code{FALSE} if a \code{--with-blas} argument is used, and
\code{TRUE} otherwise. If the default is \code{FALSE}, attempts
to change this option are silently ignored. If the default is
\code{TRUE}, it may be changed to \code{FALSE} (and then back to
\code{TRUE}).}
\item{\code{browserNLdisabled}:}{logical: whether newline is
disabled as a synonym for \code{"n"} is the browser.}
......@@ -171,7 +180,7 @@ getOption(x, default = NULL)
at startup. Note that trace output is not produced when deferred
evaluation was disabled when pqR was configured. Also, pqR will
do tasks directly (bypassing tracing) when there is no possibility
that the task will be merged or done in a helper thread, and when
that the task will be merged or done in a helper thread, or when
the operands are too small to justify the overhead of task scheduling.}
\item{\code{keep.source}:}{When \code{TRUE}, the source code for
......@@ -189,15 +198,17 @@ getOption(x, default = NULL)
environment variable \env{R_KEEP_PKG_SOURCE} is set to \code{yes}.}
\item{\code{mat_mult_with_BLAS}:}{logical vector of length four,
indicating whether a BLAS routine
(rather than a built-in C routine) should be used for \code{\%*\%},
\code{crossprod}, and \code{tcrossprod}, when the operands result
in the operation being a vector dot product, a product of a matrix
and column vector, a product of a row vector and a matrix, or a
general matrix-matrix product. May be set using a single logical
value, which is replicated to give four values. Defaults to all
\code{FALSE} unless the \code{--enable-mat-mult-with-BLAS-by-default}
option is used when configuring pqR.}
indicating whether a BLAS routine (rather than a built-in C routine)
should be used for \code{\%*\%}, \code{crossprod}, and
\code{tcrossprod}, when the operands result in the operation
being a vector dot product, a product of a matrix and column
vector, a product of a row vector and a matrix, or a general
matrix-matrix product. May be set using a single logical value,
which is replicated to give four values. The default is set by
configure when pqR is built, with the default setting being
\code{FALSE} if no \code{--with-blas} argument is used, and
\code{NA} if \code{--with-blas} is specified. See \code{\link{\%*\%}}
for more information on the meaning of this option.}
\item{\code{max.print}:}{integer, defaulting to \code{99999}.
\code{\link{print}} or \code{\link{show}} methods can make use of
......
......@@ -955,13 +955,13 @@ static SEXP do_matprod (SEXP call, SEXP op, SEXP args, SEXP rho, int variant)
except when mat_mult_with_BLAS is NA and the op is %*%, we use
the BLAS for large matrices with no NA/NaN elements. */
int use_BLAS; /* not used for vec-vec, vec-mat, or mat-vec multiplies */
int use_BLAS; /* not used for vec-vec, mat-vec, or vec-mat multiplies */
if (ncols > 1 && nrows > 1 && k > 0) {
use_BLAS = R_mat_mult_with_BLAS[3];
if (use_BLAS != NA_INTEGER || PRIMVAL(op) != 0)
if (use_BLAS != NA_LOGICAL || PRIMVAL(op) != 0)
goto done_BLAS_check;
/* Don't use the BLAS if ISNAN check is more costly than
possible gain; 3 is a somewhat arbitrary fudge factor */
/* Don't use the BLAS if the ISNAN check is more costly than
any possible gain; 3 is a somewhat arbitrary fudge factor */
use_BLAS = 0;
if (3*((double)nrows+ncols) >= (double)nrows*ncols)
goto done_BLAS_check;
......@@ -1042,7 +1042,7 @@ static SEXP do_matprod (SEXP call, SEXP op, SEXP args, SEXP rho, int variant)
}
}
else {
if (use_BLAS == 1) {
if (use_BLAS != 0) /* will always be 0 or 1, never NA */ {
task_proc = task_matprod_mat_mat_BLAS;
if (!R_BLAS_in_helpers) inhlpr = 0;
}
......@@ -1085,7 +1085,7 @@ static SEXP do_matprod (SEXP call, SEXP op, SEXP args, SEXP rho, int variant)
}
}
else {
if (use_BLAS == 1) {
if (use_BLAS != 0) /* treat NA the same as TRUE */ {
task_proc = primop==1 ? task_matprod_trans1_BLAS
: task_matprod_trans2_BLAS;
if (!R_BLAS_in_helpers) inhlpr = 0;
......
......@@ -309,6 +309,11 @@ void attribute_hidden InitOptions(void)
SET_TAG(v, install("browserNLdisabled"));
SETCAR(v, ScalarLogical(FALSE));
SETCDR(v,CONS(R_NilValue,R_NilValue));
v = CDR(v);
SET_TAG(v, install("BLAS_in_helpers"));
SETCAR(v, ScalarLogical(R_BLAS_in_helpers));
SETCDR(v,CONS(R_NilValue,R_NilValue));
v = CDR(v);
SET_TAG(v, install("mat_mult_with_BLAS"));
......@@ -678,6 +683,15 @@ static SEXP do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
R_DisableNLinBrowser = k;
SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
}
else if (streql(CHAR(namei), "BLAS_in_helpers")) {
SEXP ov;
if (TYPEOF(argi)!=LGLSXP || LENGTH(argi)!=1
|| *LOGICAL(argi)==NA_LOGICAL)
error(_("invalid value for '%s'"), CHAR(namei));
k = asLogical(argi);
if (R_BLAS_IN_HELPERS_DEFAULT != FALSE)
SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
}
else if (streql(CHAR(namei), "mat_mult_with_BLAS")) {
SEXP ov;
int j;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment