Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access BLAS Library via Mata

    There's a package in R that has some functionality I need to run some analysis. The package is not, however, implemented in Stata, which is my org's main statistical package. While I've been able to call the functions I need from Stata via an R script file, this is buggy and my some of my colleagues who don't know R want to use the package as well. This makes me wonder if it makes sense to port the package from R to Stata.
    I've been digging into the source, and the algorithms are largely written in C and C++ with a .R file handling user input from R and then passing the information to the C/C++ plugins. This appears to be done for performance optimization, as the package makes calls to the BLAS library via R. After looking through the Mata documentation, I've found the Mata interface for LAPACK, but the entire Mata documentation only mentions BLAS twice, to say that:
    The LAPACK and BLAS routines form the basis for many of Mata’s linear-algebra capabilities.
    Is there a way to access the BLAS functions via Mata directly? If so, is it possible to access those functions via a call from a C++ plugin? What would the performance implications of that be versus calling the BLAS library directly from the C/C++ code?

Working...
X