So I'm interested in this concept. I have a lot of experience with programming in C and Fortran, but little to no Java experience. Is it feasible to be able to call C code (even C++) to multiply matrices within a Java code?
My idea, in concept, is something like this
public class MatrixMultiplication
{
public static void main(String[] args)
{
// Parameters
int MATRIX_SIZE_M = 5000;
int MATRIX_SIZE_N = 5000;
// Allocate matrices for multiplication
double matrixA[][] = new double[MATRIX_SIZE_M][MATRIX_SIZE_N];
double matrixB[][] = new double[MATRIX_SIZE_N][MATRIX_SIZE_M];
double matrixC[][] = new double[MATRIX_SIZE_M][MATRIX_SIZE_N];
// Initialize matrices
...
// Call C code here to multiply C=A*B
...
// Do some other stuff with A, B, and C
...
}
}
If this can be accomplished, the next step would be to call MKL to do linear algebra computations, which would be pretty cool.
Thoughts?