summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 224c4cb)
raw | patch | inline | side by side (parent: 224c4cb)
author | Jianzhong Xu <xuj@ti.com> | |
Tue, 28 Jun 2016 19:48:33 +0000 (19:48 +0000) | ||
committer | Jianzhong Xu <xuj@ti.com> | |
Tue, 28 Jun 2016 19:48:33 +0000 (19:48 +0000) |
index b1a22ef6c1d1abaf66eb5c74984a617c6cfec64c..cc0550e7ccdbe5143a3715cea4f39938197bfbd7 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: dgemm_test.c
+* Purpose: to test BLAS function DGEMM.
+*
+* DGEMM performs one of the matrix-matrix operations
+*
+* C := alpha*op( A )*op( B ) + beta*C,
+*
+* where op( X ) is one of
+*
+* op( X ) = X or op( X ) = X**T,
+*
+* alpha and beta are scalars, and A, B and C are matrices, with op(A)
+* an m by k matrix, op(B) a k by n matrix and C an m by n matrix.
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
+#include <CL/cl_ext.h>
#include "cblas.h"
#ifdef __cplusplus
index dee1cce96ac56ed2925c83a37edfd093cc156613..a1cec5554b398843d18ddfe110c191905c67635e 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: dsyrk_test.c
+* Purpose: to test BLAS function DSYRK.
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
+#include <CL/cl_ext.h>
#include "cblas.h"
#ifdef __cplusplus
index ffec288fccb9baee0bb8d6023ee5da7dc8fa097d..6e880de3050f214eec486540017b8e914a5e5238 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: eig/main.c
+* Purpose: to demonstrate how to do Eigen decomposition and matrix inversion:
+ A*P = P*D, and A^-1 = P*D*P^-1
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
+#include <CL/cl_ext.h>
#ifdef __cplusplus
extern "C" {
void print_complex_matrix(char* desc, doublecomplex *mat, int n, int m, int ldv);
doublereal compute_evd_error(doublecomplex *matrix_reconstruct, doublereal *matrix_original, int n, int ld);
void print_performance(char * func_name, int *matrix_sizes, float *time, int num_test, int num_run);
+extern int dlatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublereal *d__, integer *mode, doublereal *cond,
+ doublereal *dmax__, char *rsign, char *grade, doublereal *dl, integer
+ *model, doublereal *condl, doublereal *dr, integer *moder, doublereal
+ *condr, char *pivtng, integer *ipivot, integer *kl, integer *ku,
+ doublereal *sparse, doublereal *anorm, char *pack, doublereal *a,
+ integer *lda, integer *iwork, integer *info);
/* Parameters */
#define MAX_ALLOWED_ERR (1e-10)
index a0afa97c4c7e925430eb20f550195c85b5fe001f..ff503132b6602e0af3749a8bddeb0aabeb57bf03 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: gemm_bench/main.c
+* Purpose: to benchmark BLAS functions xGEMM.
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
index 7660bdcfc794da0e6a9d2a3c77dd9eb92758ad69..7620dab63407a284f59f1c53124c54d87e1bcbad 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: ludinv/main.c
+* Purpose: to demonstrate how to do matrix inversion through LU decomposition
+* using LAPACK functions dgetrf_() and dgetri_().
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
+#include <CL/cl_ext.h>
#ifdef __cplusplus
extern "C" {
void print_real_matrix(char* desc, doublereal *mat, integer n, integer m, integer ldv );
double compute_inverse_error(doublereal *matrix_A, doublereal *matrix_A_inverse, integer n, integer ld);
void print_performance(integer *matrix_sizes, float *secs_runs, int num_test, int num_run);
+extern int dlatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublereal *d__, integer *mode, doublereal *cond,
+ doublereal *dmax__, char *rsign, char *grade, doublereal *dl, integer
+ *model, doublereal *condl, doublereal *dr, integer *moder, doublereal
+ *condr, char *pivtng, integer *ipivot, integer *kl, integer *ku,
+ doublereal *sparse, doublereal *anorm, char *pack, doublereal *a,
+ integer *lda, integer *iwork, integer *info);
/* Parameters */
#define MAX_ALLOWED_ERR (1e-10)
index 3063ec8ddff6293b174674f06f20fc13c90b6d26..ba346b50266581c4ef999c792039db923d447a84 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: matmpy/main.c
+* Purpose: to demonstrate how to use DGEMM for matrix multiplication.
+*
+* DGEMM performs one of the matrix-matrix operations
+*
+* C := alpha*op( A )*op( B ) + beta*C,
+*
+* where op( X ) is one of
+*
+* op( X ) = X or op( X ) = X**T,
+*
+* alpha and beta are scalars, and A, B and C are matrices, with op(A)
+* an m by k matrix, op(B) a k by n matrix and C an m by n matrix.
+******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
+#include <CL/cl_ext.h>
#include "cblas.h"
index 8b9e21a228e65ebe51edac9def11e69fa84b5ca8..0215a466f01b2416928c83d072fcc243a5b9e16a 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: ztrmm_test.c
+* Purpose: to test BLAS function ZTRMM.
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <complex.h>
+#include <CL/cl_ext.h>
#include "cblas.h"
#ifdef __cplusplus
index ab8855b738cb639d216555e6b81e23ad7403daf1..5151e5d198a0c0c5f5d276421c1d52736f2eac5b 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+/******************************************************************************
+* FILE: ztrsm_test.c
+* Purpose: to test BLAS function ZTRSM.
+******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <complex.h>
+#include <CL/cl_ext.h>
#include "cblas.h"
#ifdef __cplusplus