njpipeorgan / mathcompile Goto Github PK
View Code? Open in Web Editor NEWCompile Wolfram Language functions into C++ code and binary
License: Apache License 2.0
Compile Wolfram Language functions into C++ code and binary
License: Apache License 2.0
MathCompile cannot use external arrays and variables outside of compiler in the notebook. Is it possible to call them in process of compilation, similar to function Compile
?
With this improvement, users can simply write PacletInstall["MathCompile"]
to fetch the newest and compatible version of MathCompile after executing PacletSiteRegister@"https://github.com/njpipeorgan/MathCompile/raw/master"
.
Put all paclets in the /Paclets/
directory, and export the PacletSite[Paclet[Name->..., ...], ...]
expression as ZIP to /PacletSite.mz
, then everything will be OK.
You can use the PutSiteInfo[]
function to conveniently create PacletSite.mz
in this paclet: PacletInstall["WolframPacletSiteManager", "Site"->"https://github.com/rnotlnglgq/WolframPacletSiteManager/raw/master"]
.
if a function have same input parameter with another, then you only can call one of them.
I think the reason is they have same "name" the "man_function". so I change the name to man_function_funcid. it seem ok after that.
Hi there,
Is it possible to use OpenMP #pragmas in the compiled programs?
I can't repeat the wiki example. it tell me mc runtime error" the call to kernel function has failed"
I don't know what happened,any help?
Though I know this isn't a problem. But since MMA 12.1's front end is so slow. I have to go back to MMA 11.3. As a result , I can't use it.
After the tested codes, two errors occured to prevent the next application.
The first one was after
<< MathCompile
f = Function[{Typed[x, Integer]}, x + 2];
CompileToCode[f] `
to find the information"Import::nffil: File C:\Users\Administrator\AppData\Roaming\Mathematica\Applications/SourceFiles/src_template.cpp not found during Import."
When compiling to the binary,
f = Function[{Typed[x, {Integer, 1}]}, Times @@ x]; compiled = CompileToBinary[f];
the hint as "MCLink::noheader: The header file "math_compile.h" cannot be found.
_" failed to get the binary codes.
<<CCompilerDriver
GenericCCompiler $CCompiler={"Compiler"->GenericCCompiler,"CompilerInstallation"->"C:\\TDM-GCC-64\\bin","CompilerName"->"gcc.exe","SystemCompileOptions"->"-Ofast"};
I appreciate your great work very much with large willing to try MathCompile.
I am on windows 10, mma 12.1 , mingw
I run
CCompilerDriver`$CCompiler = {"Compiler" ->
CCompilerDriver`GenericCCompiler`GenericCCompiler,
"CompilerInstallation" -> "C:\\MinGW\\bin",
"CompilerName" -> "g++.exe"};
and then I run
$CCompiler
get
{"Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler,
"CompilerInstallation" -> "C:\MinGW\bin",
"CompilerName" -> "g++.exe"}
then I tried one example:
<< MathCompile` (*导入包*)
f = Function[{Typed[x, {Integer, 1}]},
Times @@ x];(*定义一个函数*)compiled = CompileToBinary[f];(*编译成二进制*)
It returns that
MCLink::libdir: The library directory does not exist.
So how to fix it?
As the title, Sometimes it's a lot more convenient
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.