Replies: 4 comments 8 replies
-
@Taaitaaiger issue is as per the docs it says i can use "Array::new_for" to construct arrays of arbitary types, i was able to create an array like this : |
Beta Was this translation helpful? Give feedback.
-
The easiest way is by using You can create an |
Beta Was this translation helpful? Give feedback.
-
This is incorrect, this constructs the type Can you share some code that successfully works in Julia? NB: If possible I recommend keeping as much code as possible in Julia; calling into Julia from Rust is relatively expensive (function calling overhead is at least several dozen nanoseconds on my machine). |
Beta Was this translation helpful? Give feedback.
-
@Taaitaaiger also on the julia functions being expensive to call from rust, as I understand now julia is dynamically linked rn ? can this expensive cost be removed if we statically link the julia library we want to use ? ik how we do it for C but kinda confused how would it work for a language like julia could you share any insight over this ? and if we statically link it does the garbage collector component still exists ? (if i sound dumb its prolly cause my knowledge around this domain is quite limited but been recently expanding it and you seem quite the expert so thought of asking for ur insight). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So the question is as follows say i have some abstract type in julia
abstract type XYZ{T} end
and i create structs which a sub-types of the XYZ,
struct ABC{T} <: CFMM{T}
and i have a function in julia which takes a argument of the super type xyz
random_var::Vector{C} where { C<:XYZ{T}}
am not quite sure how to build an array of the super type such that am able to pass all subtypes of xyz in a array and call the julia function which expects an array of the super type XYZ
Beta Was this translation helpful? Give feedback.
All reactions