Skip to content
Snippets Groups Projects
Commit 4dc320c3 authored by Florian Gerber's avatar Florian Gerber
Browse files

debian patch, references

parent 357fef22
No related branches found
No related tags found
No related merge requests found
Package: dotCall64 Package: dotCall64
Type: Package Type: Package
Title: Enhanced Foreign Function Interface Supporting Long Vectors Title: Enhanced Foreign Function Interface Supporting Long Vectors
Version: 0.9-04 Version: 0.9-5
Date: 2016-10-03 Date: 2017-12-05
Authors@R: c(person("Kaspar", "Moesinger", role = c("aut", "cre"), Authors@R: c(person("Kaspar", "Moesinger", role = c("aut"),
email = "kaspar.moesinger@gmail.com"), email = "kaspar.moesinger@gmail.com"),
person("Florian", "Gerber", role = "ctb", person("Florian", "Gerber", role = c("cre", "ctb"),
email = "florian.gerber@math.uzh.ch"), email = "florian.gerber@math.uzh.ch"),
person("Reinhard", "Furrer", role = "ctb", person("Reinhard", "Furrer", role = "ctb",
email = "reinhard.furrer@math.uzh.ch")) email = "reinhard.furrer@math.uzh.ch"))
Author: Kaspar Moesinger [aut, cre], Florian Gerber [ctb], Reinhard Furrer [ctb] Description: An alternative version of .C() and .Fortran() supporting long
Maintainer: Kaspar Moesinger <kaspar.moesinger@gmail.com> vectors and 64-bit integer type arguments. The provided interface .C64()
Description: features mechanisms the avoid unnecessary copies of read-only or write-only
An alternative version of .C() and .Fortran() supporting long vectors and 64-bit integer type arguments. The provided interface .C64() features mechanisms the avoid unnecessary copies of read-only or write-only arguments. This makes it a convenient and fast interface to C/C++ and Fortran code. arguments. This makes it a convenient and fast interface to C/C++ and Fortran
code.
License: GPL (>= 2) License: GPL (>= 2)
URL: https://git.math.uzh.ch/reinhard.furrer/dotCall64 URL: https://git.math.uzh.ch/reinhard.furrer/dotCall64
BugReports: https://git.math.uzh.ch/reinhard.furrer/dotCall64/issues BugReports: https://git.math.uzh.ch/reinhard.furrer/dotCall64/issues
Depends: R (>= 3.1) Depends:
R (>= 3.1)
Suggests: Suggests:
microbenchmark, microbenchmark,
OpenMPController, OpenMPController,
RColorBrewer, RColorBrewer,
roxygen2, roxygen2,
spam, spam,
testthat, testthat,
Collate: Collate:
'vector_dc.R' 'vector_dc.R'
'dotCall64.R' 'dotCall64.R'
'zzz.R' 'zzz.R'
RoxygenNote: 5.0.1
# Generated by roxygen2 (4.1.1): do not edit by hand # Generated by roxygen2: do not edit by hand
export(.C64) export(.C64)
export(integer_dc) export(integer_dc)
......
citHeader("To cite dotCall64 in publications use:") citHeader("To cite dotCall64 in publications use:")
citEntry(entry = "Article", citEntry(entry = "Article",
title = "{dotCall64}: An efficient interface to compiled {C/C++} and {F}ortran code supporting long vectors", title = "Extending {R} packages to support 64-bit compiled code: An illustration with spam64 and {GIMMS} {NDVI3g} data",
author = personList(as.person("Florian Gerber"), author = personList(as.person("Florian Gerber"),
as.person("Kaspar Moesinger"), as.person("Kaspar Moesinger"),
as.person("Reinhard Furrer")), as.person("Reinhard Furrer")),
journal = "R journal", journal = "Computer & Geoscience",
year = "2016", year = "2017",
volume = "", volume = "104",
number = "", number = "",
pages = "", pages = "109--119",
url = "", issn = "0098-3004",
note = "submitted", doi = "10.1016/j.cageo.2016.11.015",
textVersion = textVersion =
paste("F. Gerber, K. Moesinger, R. Furrer (2016),", paste("F. Gerber, K. Moesinger, R. Furrer (2017),",
"\"dotCall64: An efficient interface to compiled C/C++ and Fortran code supporting long vectors\",", "Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data,",
"submitted to the R Journal.") "Computer & Geoscience 104, 109-119, https://doi.org/10.1016/j.cageo.2016.11.015.")
) )
citEntry(entry = "Article", citEntry(entry = "Article",
title = "Extending {R} packages to support 64-bit compiled code: An illustration with spam64 and {GIMMS} {NDVI3g} data", title = "{dotCall64}: An efficient interface to compiled {C/C++} and {F}ortran code supporting long vectors",
author = personList(as.person("Florian Gerber"), author = personList(as.person("Florian Gerber"),
as.person("Kaspar Moesinger"), as.person("Kaspar Moesinger"),
as.person("Reinhard Furrer")), as.person("Reinhard Furrer")),
journal = "Computer & Geoscience", journal = "arXiv",
year = "2015", year = "2017",
volume = "", volume = "",
number = "", number = "",
pages = "", pages = "",
url = "", url = "https://arxiv.org/abs/1702.08188",
note = "submitted", note = "",
textVersion = textVersion =
paste("F. Gerber, K. Moesinger, R. Furrer (2016),", paste("F. Gerber, K. Moesinger, R. Furrer (2017),",
"\"Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data\",", "dotCall64: An efficient interface to compiled C/C++ and Fortran code supporting long vectors,",
"submitted to Computer & Geoscience.") "https://arxiv.org/abs/1702.08188.")
) )
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dotCall64.R % Please edit documentation in R/dotCall64.R
\name{dotCall64} \name{dotCall64}
\alias{.C64} \alias{.C64}
...@@ -38,7 +38,7 @@ If \code{TRUE}, any \code{NA} or \code{NaN} or \code{Inf} values in the ...@@ -38,7 +38,7 @@ If \code{TRUE}, any \code{NA} or \code{NaN} or \code{Inf} values in the
arguments are passed on to the compiled function. arguments are passed on to the compiled function.
The used time to check arguments (if \code{FALSE}) maybe considerable for large vectors.} The used time to check arguments (if \code{FALSE}) maybe considerable for large vectors.}
\item{PACKAGE}{character vector of length 1. Specifies where to search for the function given in \code{.NAME}. \item{PACKAGE}{character vector of length 1. Specifies where to search for the function given in \code{.NAME}.
This is intended to add safety for packages, This is intended to add safety for packages,
which can use this argument to ensure that no other package can override their external symbols, which can use this argument to ensure that no other package can override their external symbols,
and also speeds up the search.} and also speeds up the search.}
...@@ -55,13 +55,13 @@ by the compiled C or Fortran code. ...@@ -55,13 +55,13 @@ by the compiled C or Fortran code.
} }
\description{ \description{
\code{.C64} can be used to call compiled and loaded C functions and Fortran subroutines. \code{.C64} can be used to call compiled and loaded C functions and Fortran subroutines.
It works similar to \code{\link{.C}} and \code{\link{.Fortran}}, and It works similar to \code{\link{.C}} and \code{\link{.Fortran}}, and
\enumerate{ \enumerate{
\item supports long vectors, i.e., vectors with more than \code{2^31-1} elements, \item supports long vectors, i.e., vectors with more than \code{2^31-1} elements,
\item does the necessary castings to expose the R representation of "64-bit integers" (numeric vectors) \item does the necessary castings to expose the R representation of "64-bit integers" (numeric vectors)
to 64-bit integers arguments of the compiled function; int64_t types in C and integer (kind = 8) in Fortran, to 64-bit integers arguments of the compiled function; int64_t types in C and integer (kind = 8) in Fortran,
\item provides a mechanism the control the duplication of the R objects exposed to the compiled code, \item provides a mechanism the control the duplication of the R objects exposed to the compiled code,
\item checks if the provided R objects are of the expected type and coerces the R object if necessary. \item checks if the provided R objects are of the expected type and coerces the R object if necessary.
} }
Compared to \code{\link{.C}}, \code{.C64} has the additional arguments \code{SIGNATURE}, \code{INTENT} and \code{VERBOSE}. Compared to \code{\link{.C}}, \code{.C64} has the additional arguments \code{SIGNATURE}, \code{INTENT} and \code{VERBOSE}.
\code{SIGNATURE} specifies the types of the arguments of the compiled function. \code{SIGNATURE} specifies the types of the arguments of the compiled function.
...@@ -70,7 +70,7 @@ to the compiled function. This is then used to duplicates R objects if (and only ...@@ -70,7 +70,7 @@ to the compiled function. This is then used to duplicates R objects if (and only
} }
\examples{ \examples{
## Consider the following C function, which is included ## Consider the following C function, which is included
## in the dotCall64 package: ## in the dotCall64 package:
## void get_c(double *input, int *index, double *output) { ## void get_c(double *input, int *index, double *output) {
## output[0] = input[index[0] - 1]; ## output[0] = input[index[0] - 1];
## } ## }
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vector_dc.R % Please edit documentation in R/vector_dc.R
\name{vector_dc} \name{vector_dc}
\alias{integer_dc} \alias{integer_dc}
......
#include "dotCall64.h" #include "dotCall64.h"
// MAYBE_SHARED is not available in R 3.0.1 // MAYBE_SHARED is not available in R 3.0.1
// TODO: find out when introduced
#ifndef MAYBE_SHARED #ifndef MAYBE_SHARED
#define MAYBE_SHARED(x) (NAMED(x) > 1) #define MAYBE_SHARED(x) (NAMED(x) > 1)
#define NO_REFERENCES(x) (NAMED(x) == 0) #define NO_REFERENCES(x) (NAMED(x) == 0)
...@@ -26,6 +25,10 @@ ...@@ -26,6 +25,10 @@
// copied from dotcode.c:69 // copied from dotcode.c:69
#define MaxSymbolBytes 1024 #define MaxSymbolBytes 1024
/* Define PATH_MAX for GNU/Hurd */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
/* Attributes like PACKAGE have to be prefixed in order to not get interpreted by .External(...) */ /* Attributes like PACKAGE have to be prefixed in order to not get interpreted by .External(...) */
...@@ -107,7 +110,7 @@ SEXP dC64(SEXP args_in) { ...@@ -107,7 +110,7 @@ SEXP dC64(SEXP args_in) {
// Copy the symbol Name: // Copy the symbol Name:
p = translateChar(STRING_ELT(CAR(args_in), 0)); p = translateChar(STRING_ELT(CAR(args_in), 0));
if(strlen(p) > PATH_MAX - 1) if(strlen(p) > MaxSymbolBytes - 1)
error(_("argument '.NAME' is too long (dotCall64)")); error(_("argument '.NAME' is too long (dotCall64)"));
strcpy(symName, p); strcpy(symName, p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment