pith. sign in

arxiv: 1702.08188 · v1 · pith:FHNT2JJEnew · submitted 2017-02-27 · 📊 stat.CO

dotCall64: An Efficient Interface to Compiled C/C++ and Fortran Code Supporting Long Vectors

classification 📊 stat.CO
keywords vectorscompiledfortrancodelongargumentscalldotcall64
0
0 comments X p. Extension
pith:FHNT2JJE Add to your LaTeX paper What is a Pith Number?
\usepackage{pith}
\pithnumber{FHNT2JJE}

Prints a linked pith:FHNT2JJE badge after your title and writes the identifier into PDF metadata. Compiles on arXiv with no extra files. Learn more

read the original abstract

The R functions .C() and .Fortran() can be used to call compiled C/C++ and Fortran code from R. This so-called foreign function interface is convenient, since it does not require any interactions with the C API of R. However, it does not support long vectors (i.e., vectors of more than 2^31 elements). To overcome this limitation, the R package dotCall64 provides .C64(), which can be used to call compiled C/C++ and Fortran functions. It transparently supports long vectors and does the necessary castings to pass numeric R vectors to 64-bit integer arguments of the compiled code. Moreover, .C64() features a mechanism to avoid unnecessary copies of function arguments, making it efficient in terms of speed and memory usage.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.