Comments (1)
btw, this is the sort of thing we should be doing
/*
gcc -O3 mkl-bug.c common.c -o mkl-bug -I. -L. -lblas -lgfortran -lm
Then choosing the backend is a runtime choice:
LD_LIBRARY_PATH=. ./mkl-bug
LD_LIBRARY_PATH=/usr/lib/atlas-base:. ./mkl-bug
LD_LIBRARY_PATH=/usr/lib/openblas-base:. ./mkl-bug
LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:. ./mkl-bug
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <cblas.h>
#include "common.h"
int main() {
int m = 5;
int n = 5;
double a[25] = {
1.0, 0.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 0.0, 1.0
};
int lda = 5;
int jpvt[5] = { 0, 0, 0, 0, 0 };
double tau[5] = { 0.0, 0.0, 0.0, 0.0, 0.0 };
double *work;
int lwork = -1;
int info = 0;
double optimal = 0.0;
int i, j;
dgeqp3( &m, &n, a, &lda, jpvt, tau, &optimal, &lwork, &info );
lwork = (int)optimal;
printf("optimal = %i\n", lwork);
work = malloc(lwork * sizeof(*work));
dgeqp3( &m, &n, a, &lda, jpvt, tau, work, &lwork, &info );
printf("result = %i\n", info);
for(i = 0; i < 5; i++) {
for(j = 0; j < 5; j++) {
printf("%f ", a[j * 5 + i]);
}
printf("\n");
}
free(work);
return(0);
}
from matrix-toolkits-java.
Related Issues (20)
- Update ArpackSym.java to support the generalized eigenvector problem. HOT 4
- make a new release on maven central HOT 10
- ILUT Preconditioner Bug HOT 1
- License version? HOT 1
- SVD fails in multi-threaded operation HOT 24
- no.uib.cipr.matrix.SymmBandEigenvalueTest unreliable HOT 1
- wrong exception message in AbstractMatrix.checkMultAdd(Matrix B, Matrix C) HOT 2
- Sparse cholesky factorization HOT 2
- Estimate eigen vector using power iteration HOT 4
- Slice Linked Sparse Matrix HOT 1
- Sparse SVD HOT 1
- COO Matrix support. HOT 1
- SEGV_ACCERR when running mvn package HOT 2
- should i check in dense complex matrix? HOT 3
- Fail to replace netlib-java DLL by MKL HOT 3
- No speeding up on Sparse Matrix multiplication HOT 4
- SparseVector set function inserts 0 into data array HOT 4
- Why not offer an float-version? HOT 1
- Allow computation of (largest) Eigenvalues for general matrices. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matrix-toolkits-java.