-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoking a method that modifies an input parameter #83
Comments
JavaCall automatically converts Julia arrays to Java arrays and vice versa, but they don't share memory. What you pass to the Java method is actually a copy, that's why the argument isn't modified. If you can add custom class to JVM, then the easiest way to overcome it would be to change signature to take Another approach would be to wrap Java arrays into a special type (say, |
Yes, an adapter can work, but an extra copy is a concern. |
If you have a lot of code already working with
|
I am invoking a Java method that accepts an array as a parameter and returns an int, something like
int method(byte[] out)
.method
is modifying theout
parameter which I would like to pick Julia side.On Julia side I have:
But what I see is that
jout
is not affected by the invocation. How do I implemented this invocation pattern with JavaCall?The text was updated successfully, but these errors were encountered: