summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1677d8)
raw | patch | inline | side by side (parent: d1677d8)
author | Jianzhong Xu <xuj@ti.com> | |
Wed, 1 Jun 2016 15:24:45 +0000 (15:24 +0000) | ||
committer | Jianzhong Xu <xuj@ti.com> | |
Wed, 1 Jun 2016 15:24:45 +0000 (15:24 +0000) |
diff --git a/readme.txt b/readme.txt
index 51ea24e5bef621522ab545d7d47df3b5d731484e..234d5198e05c9af47448a576ae0df56eb59c2432 100644 (file)
--- a/readme.txt
+++ b/readme.txt
1.--------- Set environment variables ---------
-<<<<<<< HEAD
Following environment variables must be set in order to build DSP-only LINALG (version numbers are used as examples):
-=======
-Following environment vaialbes must be set in order to build DSP-only LINALG (version numbers are used as examples):
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
export CGTROOT="<TI_CGT_INSTALLATION_ROOT>/cgt-c6x"
export PDK_DIR="<COMPONENTS_INSTALLATION_ROOT>/pdk_c667x_2_0_1"
index f18a9aaaf8d53426a5645c6dd7fcc99b81a01d0c..472c00a00252ff151fa7682d84004aec3268c61b 100644 (file)
* - CLAPACK API: http://www.netlib.org/clapack/
* - @ref ti_cblas_api
*
-<<<<<<< HEAD
* @section linalg_ug User's Guide
* For detailed information about how to use LINALG, including integration, tuning, rebuilding, and porting to
* more devices, please refer to http://processors.wiki.ti.com/index.php/Processor_SDK_Linear_Algebra_Library.
*
-=======
- * @section linalg_integration Integration
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
*/
diff --git a/src/ti/linalg/tuning/cgemm_tune/cgemm_tune.c b/src/ti/linalg/tuning/cgemm_tune/cgemm_tune.c
index 19792a4bf9e059da3927e4674e2eb92b46a1f980..fb07301873d839b568b044d24702b3c624a41029 100644 (file)
@@ -204,7 +204,6 @@ int run_cgemm_dsp_and_arm(int M, int K, int N, float *time_dsp, float *time_arm,
/*-------------------------------------------------------------------------
* Initialize matrices and print if small enough.
*------------------------------------------------------------------------*/
-<<<<<<< HEAD
for (i = 0; i < (long long)M*K; ++i)
{
A[i] = (float)rand()/RAND_MAX + (float)rand()/RAND_MAX * I;
@@ -214,17 +213,6 @@ int run_cgemm_dsp_and_arm(int M, int K, int N, float *time_dsp, float *time_arm,
B[i] = (float)rand()/RAND_MAX + (float)rand()/RAND_MAX * I;
}
for (i = 0; i < (long long)M*N; ++i)
-=======
- for (i = 0; i < M*K; ++i)
- {
- A[i] = (float)rand()/RAND_MAX + (float)rand()/RAND_MAX * I;
- }
- for (i = 0; i < K*N; ++i)
- {
- B[i] = (float)rand()/RAND_MAX + (float)rand()/RAND_MAX * I;
- }
- for (i = 0; i < M*N; ++i)
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
{
Carm[i] = Cdsp[i] = (float)rand()/RAND_MAX + (float)rand()/RAND_MAX * I;
}
index 5cf4d497b5b050a557c96adc1f8e0628ae20e7d2..9aed1775c9ae77dba495fc7124c33a5a1d4e4c30 100644 (file)
#include <math.h>
#include <complex.h>
-<<<<<<< HEAD
#define EPISILON 1e-5
#define DELTA 1e-5
#define NERRORS 5
if ( (delta > EPISILON*norm) && (delta > DELTA)) {
if ((num_errors += 1) < NERRORS) {
printf("Error [elem:%d]: %e <==> %e\n", i, C1[i], C2[i]);
-=======
-/*-----------------------------------------------------------------------------
-* Compare two single precision complex matrices
-*----------------------------------------------------------------------------*/
-int comp_matrix_complex(const float complex *C1, const float complex *C2, int M, int N)
-{
- int i;
- float norm, delta;
- const float EPISILON = 1e-5;
- const float DELTA = 1e-5;
- const int NERRORS = 5;
- int num_errors = 0;
-
- for (i=0; i<M*N; i++)
- {
- delta = cabs(C1[i]) - cabs(C2[i]);
- norm = cabs(C1[i]);
- if(norm < cabs(C2[i])) {
- norm = cabs(C2[i]);
- }
-
- if (delta > EPISILON*norm && delta>DELTA) {
- if ((num_errors += 1) < NERRORS) {
- printf("Error [elem:%d]: %f <==> %f\n", i, cabs(C1[i]), cabs(C2[i]));
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
}
}
}
@@ -103,18 +77,13 @@ int comp_matrix_complex(const float complex *C1, const float complex *C2, int M,
}
return num_errors;
-<<<<<<< HEAD
}
-=======
-} /* comp_matrix_complex */
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
/*-----------------------------------------------------------------------------
* Compare two double precision real matrices
*----------------------------------------------------------------------------*/
int comp_matrix_double(const double *C1, const double *C2, int M, int N)
{
-<<<<<<< HEAD
long long i;
double norm;
int num_errors = 0;
}
if ( (delta > EPISILON*norm) && (delta > DELTA)) {
-=======
- int i;
- const double EPISILON = 1e-10;
- const int NERRORS = 5;
- int num_errors = 0;
-
- for (i=0; i<(long)M*N; i++)
- {
- double delta = fabs(C1[i] - C2[i]);
- if (delta > EPISILON*fabs(C1[i])) {
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
if ((num_errors += 1) < NERRORS) {
printf("Error [elem:%d]: %e <==> %e\n", i, C1[i], C2[i]);
}
} /* comp_matrix_double */
/*-----------------------------------------------------------------------------
-<<<<<<< HEAD
* Compare two single precision complex matrices
*----------------------------------------------------------------------------*/
int comp_matrix_complex(const float complex *C1, const float complex *C2, int M, int N)
@@ -182,24 +139,6 @@ int comp_matrix_complex(const float complex *C1, const float complex *C2, int M,
if ((num_errors += 1) < NERRORS) {
printf("Error [elem:%d]: %e + %e*j <==> %e + %e*j\n", i,
crealf(C1[i]), cimagf(C1[i]), crealf(C2[i]), cimagf(C2[i]));
-=======
-* Compare two single precision real matrices
-*----------------------------------------------------------------------------*/
-int comp_matrix(const float *C1, const float *C2, int M, int N)
-{
- int i;
- const float EPISILON = 1e-5;
- const int NERRORS = 5;
- int num_errors = 0;
-
- for (i=0; i<(long)M*N; i++)
- {
- float delta = fabs(C1[i] - C2[i]);
-
- if (delta > EPISILON*fabs(C1[i])) {
- if ((num_errors += 1) < NERRORS) {
- printf("Error [elem:%d]: %e <==> %e\n", i, C1[i], C2[i]);
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
}
}
}
}
return num_errors;
-<<<<<<< HEAD
} /* comp_matrix_complex */
-=======
-}
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
/*-----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
int comp_matrix_double_complex(const double complex *C1, const double complex *C2, int M, int N)
{
-<<<<<<< HEAD
long long i;
int num_errors = 0;
@@ -243,34 +177,11 @@ int comp_matrix_double_complex(const double complex *C1, const double complex *C
if ((num_errors += 1) < NERRORS) {
printf("Error [elem:%d]: %e + %e*j <==> %e + %e*j\n", i,
creal(C1[i]), cimag(C1[i]), creal(C2[i]), cimag(C2[i]));
-=======
- int i;
- const double EPISILON = 1e-10;
- const int NERRORS = 5;
- int num_errors = 0;
-
- for (i=0; i<M*N; i++)
- {
- double delta = fabs(cabs(C1[i]) - cabs(C2[i]));
-
- if (delta > EPISILON*cabs(C1[i])) {
- if ((num_errors += 1) < NERRORS) {
- printf("Error [elem:%d]: %f <==> %f\n", i, cabs(C1[i]), cabs(C2[i]));
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
}
}
}
-<<<<<<< HEAD
DISPLAY_ERROR_MESSAGE(num_errors);
-=======
- if (num_errors > 0) {
- printf("FAIL with %d errors!\n", num_errors);
- }
- else {
- printf("PASS!\n");
- }
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
return num_errors;
} /* comp_matrix_double_complex */
index 62ce2bfd3609c7e01e4a60bbd7b3b0e19d55cd35..cd3c6538463667638d51f7970f3c1ae39edd9851 100644 (file)
CC = gcc
endif
-<<<<<<< HEAD
CFLAGS = -g -O2 -I$(TARGET_ROOTDIR)/usr/include -I../../include
-=======
-CFLAGS = -g -O2 -I$(TARGET_ROOTDIR)/usr/include -I$(LINALG_DIR)/packages/ti/linalg
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
LIB_DIR = ../../lib
LD_FLAGS=-L$(TARGET_ROOTDIR)/lib -L$(TARGET_ROOTDIR)/usr/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/usr/lib
diff --git a/src/ti/linalg/tuning/zgemm_tune/zgemm_tune.c b/src/ti/linalg/tuning/zgemm_tune/zgemm_tune.c
index 2b9205e00dfa1a15f83c0da438b5a964494ffa5c..beb3fbc7561c5caf8458096d17e33b7d7d917c88 100644 (file)
@@ -205,7 +205,6 @@ int run_zgemm_dsp_and_arm(int M, int N, int K, float *time_dsp, float *time_arm,
/*-------------------------------------------------------------------------
* Initialize matrices and print if small enough.
*------------------------------------------------------------------------*/
-<<<<<<< HEAD
for (i = 0; i < (long long)M*K; ++i)
{
A[i] = (double)rand()/RAND_MAX + (double)rand()/RAND_MAX * I;
@@ -215,17 +214,6 @@ int run_zgemm_dsp_and_arm(int M, int N, int K, float *time_dsp, float *time_arm,
B[i] = (double)rand()/RAND_MAX + (double)rand()/RAND_MAX * I;
}
for (i = 0; i < (long long)M*N; ++i)
-=======
- for (i = 0; i < M*K; ++i)
- {
- A[i] = (double)rand()/RAND_MAX + (double)rand()/RAND_MAX * I;
- }
- for (i = 0; i < K*N; ++i)
- {
- B[i] = (double)rand()/RAND_MAX + (double)rand()/RAND_MAX * I;
- }
- for (i = 0; i < M*N; ++i)
->>>>>>> 299debba568f6179b3bdbaf0a1242579dd466cf7
{
Carm[i] = Cdsp[i] = (double)rand()/RAND_MAX + (double)rand()/RAND_MAX * I;
}