- array2D : This curve corresponds to the following Blitz container :
typedef blitz::Array < real , 2 > gene_matrix;
and the following C like implementation :
static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)
{
real somme;
for (int i=0;i < N;i++){
for (int j=0;j < N;j++){
somme=0.0;
for (int k=0;k < N;k++){
somme+=A(i,k)*B(k,j);
}
X(i,j)=somme;
}
}
}
- matrix : This curve corresponds to the following Blitz container :
typedef blitz::Matrix < real > gene_matrix;
and the same C like implementation :
- condensed : This curve corresponds to the following Blitz container :
typedef blitz::Array < real , 2 > gene_matrix;
and the following Blitz compliant implementation :
static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)
{
firstIndex i;
secondIndex j;
thirdIndex k;
X = sum(A(i,k) * B(k,j), k);
}