Does the library ND4J (N-Dimensional Arrays for Java) support parallel computing as like in numpy for Python?
-
1So what does this have to do with **[tag:Python]** and **[tag:Numpy]**? – Antti Haapala -- Слава Україні Sep 16 '17 at 20:10
-
to multiply some n-dimensional arrays for example – Yevheniy Tymchishin Sep 16 '17 at 20:13
1 Answers
Not sure what you mean by "parallel computing", largely we're implemented in c/c++ but also support cuda as well as mkl, and power chips as well.
Due to how broad your question is, I can only assume you aren't really looking for a "deep" answer to this question but I can tell you that we have the buzzwords you'd expect like openmp, blas/lapack, sparse,..
So editing my answer a bit: Numpy operations that are "vectorized" are just for loops in c. Python inherently has slow loops and is largely a slow language.
Another edit: It would be physically impossible for us to support gpus if there wasn't a ton of c code buried in there. We also couldn't do blas without JNI. Nd4j is definitely NOT a pure java library.
We run all the real logic in: https://github.com/deeplearning4j/libnd4j
So yes: in that effect we have "c++ based for loops" in there yes. The for loops are multi threaded or "parallelized" using cuda and openmp/mkl.

- 3,055
- 1
- 10
- 12
-
And this is not an *answer*. The question in itself is rather well-defined – Antti Haapala -- Слава Україні Sep 16 '17 at 20:14
-
for example if I use python and do some operation with arrays by using loops, it takes a lot of time. But, if I use numpy for these operation it executes very fast. So, the question is: can ND4J provide such possibilities? – Yevheniy Tymchishin Sep 16 '17 at 20:17
-
I disagree that wasn't an "answer" frankly. Numpy operations are parallelized in that exact way. Those things happen via SIMD and openmp. I still stand by my earlier response that "parlalelized" is an over loaded term that can mean multi threading, or what he *should* have used: "vectorized" – Adam Gibson Sep 16 '17 at 20:20
-
-
Please check my edit? I'm not sure what more of an answer you want. – Adam Gibson Sep 16 '17 at 20:25
-