Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AGULLO Emmanuel
Chameleon
Commits
18ff643a
Commit
18ff643a
authored
Dec 22, 2016
by
Mathieu Faverge
Browse files
Fix remaining min/max
parent
9e668381
Changes
27
Hide whitespace changes
Inline
Side-by-side
compute/pzlansy.c
View file @
18ff643a
...
...
@@ -212,8 +212,8 @@ void morse_pzlansy(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *re
* MorseFrobeniusNorm
*/
case
MorseFrobeniusNorm
:
workm
=
max
(
A
->
mt
,
A
->
p
);
workn
=
max
(
A
->
nt
,
A
->
q
);
workm
=
chameleon_
max
(
A
->
mt
,
A
->
p
);
workn
=
chameleon_
max
(
A
->
nt
,
A
->
q
);
MORSE_Desc_Create
(
&
(
VECNORMS_STEP1
),
NULL
,
MorseRealDouble
,
1
,
2
,
2
,
workm
,
2
*
workn
,
0
,
0
,
workm
,
2
*
workn
,
A
->
p
,
A
->
q
);
...
...
@@ -361,8 +361,8 @@ void morse_pzlansy(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *re
/* Init workspace handle for the call to zlange but unused */
RUNTIME_options_ws_alloc
(
&
options
,
1
,
0
);
workm
=
max
(
A
->
mt
,
A
->
p
);
workn
=
max
(
A
->
nt
,
A
->
q
);
workm
=
chameleon_
max
(
A
->
mt
,
A
->
p
);
workn
=
chameleon_
max
(
A
->
nt
,
A
->
q
);
MORSE_Desc_Create
(
&
(
VECNORMS_STEP1
),
NULL
,
MorseRealDouble
,
1
,
1
,
1
,
workm
,
workn
,
0
,
0
,
workm
,
workn
,
A
->
p
,
A
->
q
);
...
...
compute/pztpgqrt.c
View file @
18ff643a
...
...
@@ -58,7 +58,7 @@ void morse_pztpgqrt( int L, MORSE_desc_t *V, MORSE_desc_t *T, MORSE_desc_t *A, M
ib
=
MORSE_IB
;
/*
* zt
s
mqr = A->nb * ib
* zt
p
mqr
t
= A->nb * ib
*/
ws_worker
=
A
->
nb
*
ib
;
...
...
@@ -66,7 +66,7 @@ void morse_pztpgqrt( int L, MORSE_desc_t *V, MORSE_desc_t *T, MORSE_desc_t *A, M
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zt
s
mqr = 2 * A->nb * ib
* zt
p
mqr
t
= 2 * A->nb * ib
*/
ws_worker
=
chameleon_max
(
ws_worker
,
ib
*
A
->
nb
*
2
);
#endif
...
...
compute/pztpqrt.c
View file @
18ff643a
...
...
@@ -56,10 +56,8 @@ void morse_pztpqrt( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
ib
=
MORSE_IB
;
/*
* zgeqrt = A->nb * (ib+1)
* zunmqr = A->nb * ib
* ztsqrt = A->nb * (ib+1)
* ztsmqr = A->nb * ib
* ztsqrt = A->nb * (ib+1)
* ztpmqrt = A->nb * ib
*/
ws_worker
=
A
->
nb
*
(
ib
+
1
);
...
...
@@ -67,8 +65,7 @@ void morse_pztpqrt( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
* ztsmqr = 2 * A->nb * ib
* ztpmqrt = 2 * A->nb * ib
*/
ws_worker
=
chameleon_max
(
ws_worker
,
ib
*
A
->
nb
*
2
);
#endif
...
...
@@ -76,15 +73,13 @@ void morse_pztpqrt( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztpqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker
=
chameleon_max
(
ws_worker
,
ib
*
(
ib
+
A
->
nb
)
);
/* Host space
*
* zgeqrt = ib * (A->mb+3*ib) + A->mb )
* ztsqrt = 2 * ib * (A->nb+ib) + A->nb
* ztpqrt = 2 * ib * (A->nb+ib) + A->nb
*/
ws_host
=
chameleon_max
(
ws_host
,
ib
*
(
A
->
mb
+
3
*
ib
)
+
A
->
mb
);
ws_host
=
chameleon_max
(
ws_host
,
2
*
ib
*
(
A
->
nb
+
ib
)
+
A
->
nb
);
...
...
compute/zbuild.c
View file @
18ff643a
...
...
@@ -115,7 +115,7 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N,
return
-
4
;
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -280,7 +280,7 @@ int MORSE_zbuild_Tile_Async( MORSE_enum uplo, MORSE_desc_t *A,
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
return
MORSE_SUCCESS
;
morse_pzbuild
(
uplo
,
A
,
user_data
,
user_build_callback
,
sequence
,
request
);
...
...
compute/zgelqf.c
View file @
18ff643a
...
...
@@ -106,7 +106,7 @@ int MORSE_zgelqf(int M, int N,
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNBSIZE */
...
...
@@ -120,7 +120,7 @@ int MORSE_zgelqf(int M, int N,
NB
=
MORSE_NB
;
morse_sequence_create
(
morse
,
&
sequence
);
/* if ( MORSE_TRANSLATION == MORSE_OUTOFPLACE ) {*/
morse_zooplap2tile
(
descA
,
A
,
NB
,
NB
,
LDA
,
N
,
0
,
0
,
M
,
N
,
sequence
,
&
request
,
morse_desc_mat_free
(
&
(
descA
))
);
...
...
@@ -200,7 +200,7 @@ int MORSE_zgelqf_Tile(MORSE_desc_t *A, MORSE_desc_t *T)
MORSE_zgelqf_Tile_Async
(
A
,
T
,
sequence
,
&
request
);
morse_sequence_wait
(
morse
,
sequence
);
RUNTIME_desc_getoncpu
(
A
);
status
=
sequence
->
status
;
morse_sequence_destroy
(
morse
,
sequence
);
return
status
;
...
...
@@ -274,7 +274,7 @@ int MORSE_zgelqf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T,
}
/* Quick return */
/*
if (min(M, N) == 0)
if (
chameleon_
min(M, N) == 0)
return MORSE_SUCCESS;
*/
if
(
morse
->
householder
==
MORSE_FLAT_HOUSEHOLDER
)
{
...
...
compute/zgeqrf.c
View file @
18ff643a
...
...
@@ -105,7 +105,7 @@ int MORSE_zgeqrf(int M, int N,
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNBSIZE */
...
...
@@ -273,7 +273,7 @@ int MORSE_zgeqrf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T,
}
/* Quick return */
/*
if (min(M, N) == 0)
if (
chameleon_
min(M, N) == 0)
return MORSE_SUCCESS;
*/
if
(
morse
->
householder
==
MORSE_FLAT_HOUSEHOLDER
)
{
...
...
compute/zgesv_incpiv.c
View file @
18ff643a
...
...
@@ -120,7 +120,7 @@ int MORSE_zgesv_incpiv(int N, int NRHS,
return
-
8
;
}
/* Quick return */
if
(
min
(
N
,
NRHS
)
==
0
)
if
(
chameleon_
min
(
N
,
NRHS
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNB */
...
...
@@ -306,7 +306,7 @@ int MORSE_zgesv_incpiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV, M
}
/* Quick return */
/*
if (min(N, NRHS) == 0)
if (
chameleon_
min(N, NRHS) == 0)
return MORSE_SUCCESS;
*/
...
...
compute/zgesv_nopiv.c
View file @
18ff643a
...
...
@@ -119,7 +119,7 @@ int MORSE_zgesv_nopiv(int N, int NRHS,
return
-
8
;
}
/* Quick return */
if
(
min
(
N
,
NRHS
)
==
0
)
if
(
chameleon_
min
(
N
,
NRHS
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNB */
...
...
@@ -294,7 +294,7 @@ int MORSE_zgesv_nopiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *B,
}
/* Quick return */
/*
if (min(N, NRHS) == 0)
if (
chameleon_
min(N, NRHS) == 0)
return MORSE_SUCCESS;
*/
...
...
compute/zgetrf_incpiv.c
View file @
18ff643a
...
...
@@ -107,7 +107,7 @@ int MORSE_zgetrf_incpiv(int M, int N,
return
-
4
;
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNBSIZE */
...
...
@@ -278,7 +278,7 @@ int MORSE_zgetrf_incpiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV,
}
/* Quick return */
/*
if (min(M, N) == 0)
if (
chameleon_
min(M, N) == 0)
return MORSE_SUCCESS;
*/
...
...
compute/zgetrf_nopiv.c
View file @
18ff643a
...
...
@@ -100,7 +100,7 @@ int MORSE_zgetrf_nopiv(int M, int N,
return
-
4
;
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on M, N & NRHS; Set NBNBSIZE */
...
...
compute/zgetrs_incpiv.c
View file @
18ff643a
...
...
@@ -126,7 +126,7 @@ int MORSE_zgetrs_incpiv(MORSE_enum trans, int N, int NRHS,
return
-
9
;
}
/* Quick return */
if
(
min
(
N
,
NRHS
)
==
0
)
if
(
chameleon_
min
(
N
,
NRHS
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on N & NRHS; Set NBNBSIZE */
...
...
@@ -309,7 +309,7 @@ int MORSE_zgetrs_incpiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV,
}
/* Quick return */
/*
if (min(N, NRHS) == 0)
if (
chameleon_
min(N, NRHS) == 0)
return MORSE_SUCCESS;
*/
morse_pztrsmpl
(
A
,
B
,
L
,
IPIV
,
sequence
,
request
);
...
...
compute/zgetrs_nopiv.c
View file @
18ff643a
...
...
@@ -120,7 +120,7 @@ int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS,
return
-
9
;
}
/* Quick return */
if
(
min
(
N
,
NRHS
)
==
0
)
if
(
chameleon_
min
(
N
,
NRHS
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB & IB depending on N & NRHS; Set NBNBSIZE */
...
...
@@ -293,7 +293,7 @@ int MORSE_zgetrs_nopiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *B,
}
/* Quick return */
/*
if (min(N, NRHS) == 0)
if (
chameleon_
min(N, NRHS) == 0)
return MORSE_SUCCESS;
*/
morse_pztrsm
(
MorseLeft
,
MorseLower
,
MorseNoTrans
,
MorseUnit
,
(
MORSE_Complex64_t
)
1
.
0
,
A
,
B
,
sequence
,
request
);
...
...
compute/zlacpy.c
View file @
18ff643a
...
...
@@ -44,7 +44,7 @@
* = MorseLower: Lower triangular part
*
* @param[in] M
* The number of rows of the matrix A. M >= 0.
* The number of rows of the matrix A. M >= 0.
*
* @param[in] N
* The number of columns of the matrix A. N >= 0.
...
...
@@ -90,7 +90,7 @@ int MORSE_zlacpy(MORSE_enum uplo, int M, int N,
return
MORSE_ERR_NOT_INITIALIZED
;
}
/* Check input arguments */
if
(
(
uplo
!=
MorseUpperLower
)
&&
if
(
(
uplo
!=
MorseUpperLower
)
&&
(
uplo
!=
MorseUpper
)
&&
(
uplo
!=
MorseLower
)
)
{
morse_error
(
"MORSE_zlacpy"
,
"illegal value of uplo"
);
...
...
@@ -114,7 +114,7 @@ int MORSE_zlacpy(MORSE_enum uplo, int M, int N,
}
/* Quick return */
if
(
min
(
N
,
M
)
==
0
)
if
(
chameleon_
min
(
N
,
M
)
==
0
)
return
(
double
)
0
.
0
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -281,14 +281,14 @@ int MORSE_zlacpy_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B,
return
morse_request_fail
(
sequence
,
request
,
MORSE_ERR_ILLEGAL_VALUE
);
}
/* Check input arguments */
if
(
(
uplo
!=
MorseUpperLower
)
&&
if
(
(
uplo
!=
MorseUpperLower
)
&&
(
uplo
!=
MorseUpper
)
&&
(
uplo
!=
MorseLower
)
)
{
morse_error
(
"MORSE_zlacpy_Tile_Async"
,
"illegal value of uplo"
);
return
-
1
;
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
{
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
{
return
MORSE_SUCCESS
;
}
...
...
compute/zlange.c
View file @
18ff643a
...
...
@@ -118,7 +118,7 @@ double MORSE_zlange(MORSE_enum norm, int M, int N,
}
/* Quick return */
if
(
min
(
N
,
M
)
==
0
)
if
(
chameleon_
min
(
N
,
M
)
==
0
)
return
(
double
)
0
.
0
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -281,7 +281,7 @@ int MORSE_zlange_Tile_Async(MORSE_enum norm, MORSE_desc_t *A, double *value,
return
morse_request_fail
(
sequence
,
request
,
MORSE_ERR_ILLEGAL_VALUE
);
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
{
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
{
*
value
=
0
.
0
;
return
MORSE_SUCCESS
;
}
...
...
compute/zlantr.c
View file @
18ff643a
...
...
@@ -138,7 +138,7 @@ double MORSE_zlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
}
/* Quick return */
if
(
min
(
N
,
M
)
==
0
)
if
(
chameleon_
min
(
N
,
M
)
==
0
)
return
(
double
)
0
.
0
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -315,7 +315,7 @@ int MORSE_zlantr_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
{
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
{
*
value
=
0
.
0
;
return
MORSE_SUCCESS
;
}
...
...
compute/zlaset.c
View file @
18ff643a
...
...
@@ -111,7 +111,7 @@ int MORSE_zlaset(MORSE_enum uplo, int M, int N,
}
/* Quick return */
if
(
min
(
N
,
M
)
==
0
)
if
(
chameleon_
min
(
N
,
M
)
==
0
)
return
(
double
)
0
.
0
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -275,7 +275,7 @@ int MORSE_zlaset_Tile_Async(MORSE_enum uplo,
return
-
1
;
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
{
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
{
return
MORSE_SUCCESS
;
}
...
...
compute/zplghe.c
View file @
18ff643a
...
...
@@ -258,7 +258,7 @@ int MORSE_zplghe_Tile_Async( double bump,
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
return
MORSE_SUCCESS
;
morse_pzplghe
(
bump
,
uplo
,
A
,
seed
,
sequence
,
request
);
...
...
compute/zplgsy.c
View file @
18ff643a
...
...
@@ -260,7 +260,7 @@ int MORSE_zplgsy_Tile_Async( MORSE_Complex64_t bump,
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
return
MORSE_SUCCESS
;
morse_pzplgsy
(
bump
,
uplo
,
A
,
seed
,
sequence
,
request
);
...
...
compute/zplrnt.c
View file @
18ff643a
...
...
@@ -98,7 +98,7 @@ int MORSE_zplrnt( int M, int N,
return
-
4
;
}
/* Quick return */
if
(
min
(
M
,
N
)
==
0
)
if
(
chameleon_
min
(
M
,
N
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB depending on M, N & NRHS; Set NBNB */
...
...
@@ -248,7 +248,7 @@ int MORSE_zplrnt_Tile_Async( MORSE_desc_t *A,
}
/* Quick return */
if
(
min
(
A
->
m
,
A
->
n
)
==
0
)
if
(
chameleon_
min
(
A
->
m
,
A
->
n
)
==
0
)
return
MORSE_SUCCESS
;
morse_pzplrnt
(
A
,
seed
,
sequence
,
request
);
...
...
compute/zposv.c
View file @
18ff643a
...
...
@@ -133,7 +133,7 @@ int MORSE_zposv(MORSE_enum uplo, int N, int NRHS,
}
/* Quick return - currently NOT equivalent to LAPACK's
* LAPACK does not have such check for DPOSV */
if
(
min
(
N
,
NRHS
)
==
0
)
if
(
chameleon_
min
(
N
,
NRHS
)
==
0
)
return
MORSE_SUCCESS
;
/* Tune NB depending on M, N & NRHS; Set NBNBSIZE */
...
...
@@ -324,7 +324,7 @@ int MORSE_zposv_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B,
/* Quick return - currently NOT equivalent to LAPACK's
* LAPACK does not have such check for DPOSV */
/*
if (min(N, NRHS) == 0)
if (
chameleon_
min(N, NRHS) == 0)
return MORSE_SUCCESS;
*/
morse_pzpotrf
(
uplo
,
A
,
sequence
,
request
);
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment