Comments (2)
When you write a program for Aladdin, there are two parts: the kernel that Aladdin converts into an accelerator model, and all the surrounding code (e.g. main, reading from input files, etc). The kernel must be C, but the surrounding code can be C++. Example:
extern "C" {
void my_kernel(int* array, size) {
// This is the function that gets traced by LLVM-Tracer.
// this MUST be C
}
}
int main() {
// Surrounding code can use C++.
std::vector<int> data{1,2,3,4};
my_kernel(data.data(), data.size());
}
Note the extern "C"
block - that ensures C-style linkage, so you don't need to worry about C++ name mangling.
from aladdin.
it's clear to me !
thank you !
from aladdin.
Related Issues (20)
- Compilation of Aladdin is not working as per instructions HOT 1
- SHOC/fft dynamic trace not forming in dma-trace-binary
- bash: $../ALADDIN_HOME/common/aladdin: No such file or directory HOT 3
- full_trace.so no such file or directory HOT 4
- About configure file HOT 2
- How did file dynamic_trace.gz come about? HOT 1
- can't produce dynamic_trace.gz HOT 2
- A problem about running aladdin HOT 2
- Error: can't find library python2.7 required by python HOT 1
- /usr/bin/ld: /tmp/ccP7FT6j.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC #30 HOT 2
- declare it as partition_factor 1 in your config file, like: like what๏ผ HOT 1
- About the generation of binary files HOT 1
- Benchmarking math functions HOT 2
- Simulation crashes caused by empty array labels in host memory operations
- Failed to build aladdin HOT 1
- Xyzsam/gem5-Aladdin missing build director HOT 13
- Run gem5-aladdin images and run example (with Window putty to Linux)
- Running ALADIN for bb_gemm [ Crash ] HOT 2
- issue about power_dalay data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aladdin.