[mlpack] Ensmallen and pure C

Ryan Curtin ryan at ratml.org
Fri Jan 24 10:36:46 EST 2020


On Fri, Jan 24, 2020 at 12:45:46AM +0100, Marcus Edel wrote:
> Hello,
> 
> At some point you need a C++ compiler, so unless you want to package ensmallen
> and provide a build for various systems (linux, macOS, windows, etc.), export
> the interface I don't think you can get around the C++ compiler dependecy.
> 
> But README.md does mention that "QuEST is easy to run both on laptops and
> supercomputers (in both C and C++)," so I'm wondering if you have to rewrite
> anything if you can compile the code with a C++ compiler you are good to go.

I think that there is another way too; the mlpack bindings to Python and
Julia kind of use an intermediate step---they bind to C first.  So if
you have a C++ compiler, you can write some C++ code and bind it in an
"extern "C"" block, then call it from C.

I think that this should work... I know I haven't provided many details
because I'm not sure of the exact syntax right now.  Let me know if I
can clarify further.

-- 
Ryan Curtin    | "I was misinformed."
ryan at ratml.org |   - Rick Blaine


More information about the mlpack mailing list