sillycross / pochivm Goto Github PK
View Code? Open in Web Editor NEWLightweight framework for easy and efficient code generation
Home Page: https://sillycross.github.io/PochiVM
Lightweight framework for easy and efficient code generation
Home Page: https://sillycross.github.io/PochiVM
I have been playing around with PochiVM.
I have run into problems using it with an array (holding uint8_t elements).
Forgive me, I'm not a c/c++ dev and likely to be doing something stupid.
If I try to add a primitive array to a Class I see an error:
[ERROR] Calling function with array-typed parameter or return value is not supported yet. Change it to pointer-type to workaround. Offending function:
If I however try to pass an array as a parameter to a method I see this error at runtime:
Cannot allocate unsized type
%param_0 = alloca %class.Tutorial101
storing unsized types is not allowed
If I try to add an std:array (or std:vector) to a Class as a member variable and register it I see a bunch of errors in generated code:
RegisterMemberObject<&Tutorial101::test>();
In file included from ../../pochivm/api_function_proto.h:9:
../../generated/release/generated/pochivm_runtime_headers.generated.h:192:35: error: incomplete result type 'Reference<std::array<int, 5> >' in function definition
Reference<std::array<int, 5>> test() {
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:23:18: note: forward declaration of 'PochiVM::Reference<std::array<int, 5> >'
template<> class Reference<std::array<int, 5>>;
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:211:16: error: 'Reference<std::array<int, 5> >' is an incomplete type
return Reference<std::array<int, 5>>(new AstCallExpr(&__pochivm_cpp_fn_metadata, std::vector<AstNodeBase*>{ __pochivm_ref_ptr }));
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:23:18: note: forward declaration of 'PochiVM::Reference<std::array<int, 5> >'
template<> class Reference<std::array<int, 5>>;
I could just be going down the wrong path... (In which case an example using a primitive array (or std:array) of type uint8_t would be great), or if support for arrays is not there yet.
Is the latter is the case, can support be added?
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.