You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing we wonder about is whether we use JLink and the kernel correctly, and in the most efficient way. #34 describes how we start the kernel and evaluate expressions (translated from Clojure):
The expression is constructed using its various constructors, such as new Expr(Expr.SYMBOL, "someName") and (type signature) Expr(Expr head, Expr[] tail), though in a few cases, as a fallback, we use a loopback link:
varinput = ...; // input could be a Long, a jlink Expr (which seems unnecessary?!), object array; String, long arrayvarlink = MathLinkFactory.createLoopbackLink();
link.put(input); link.endPacket();
returnlink.getExpr();
Is this the right way? I believe we never "release" the expressions, if that concept exists. Is that ok?
On parallelism and concurrency
Also, find out about concurrency vs. parallelism: how many kernels can we run in parallel? Is it a good idea? And what if we submit expressions from multiple threads to a single kernel - I assume the kernel is single-threaded and executes them one by one, is it so? And is it faster or slower than if we serialize these requests on our side before sending any to the kernel?
The text was updated successfully, but these errors were encountered:
One thing we wonder about is whether we use JLink and the kernel correctly, and in the most efficient way. #34 describes how we start the kernel and evaluate expressions (translated from Clojure):
The expression is constructed using its various constructors, such as
new Expr(Expr.SYMBOL, "someName")
and (type signature)Expr(Expr head, Expr[] tail)
, though in a few cases, as a fallback, we use a loopback link:Is this the right way? I believe we never "release" the expressions, if that concept exists. Is that ok?
On parallelism and concurrency
Also, find out about concurrency vs. parallelism: how many kernels can we run in parallel? Is it a good idea? And what if we submit expressions from multiple threads to a single kernel - I assume the kernel is single-threaded and executes them one by one, is it so? And is it faster or slower than if we serialize these requests on our side before sending any to the kernel?
The text was updated successfully, but these errors were encountered: