Replies: 3 comments 9 replies
-
I can't make it compile:
|
Beta Was this translation helpful? Give feedback.
-
You could write a Another way is to customize |
Beta Was this translation helpful? Give feedback.
-
If you're maintaining the C code on your own, a good practice is to expose opaque types(e.g. typedef struct s3* s3_handle) with a set of API functions working with these opaque types(e.g. int create_s3(s3_handle x)). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Suppose I have some C code that looks like this:
Using Clang.jl, the following Julia code is generated:
The 2 and 3 dimensional static arrays in the structs will generate long nested tuples that take forever to compile. This compilation latency is a well know issue in Julia. Is there a workaround in Clang.jl?
One of the workarounds I thought of is to create aliases for those structs and replace the static arrays with pointers. Then, in Julia, I would declare Julia arrays and fill them. Finally, in the C code, I would copy the data from the alias stucts to the originals structs. The alias stucts might look like this:
and will generate the following:
Any help would be appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions