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
6a7a74cc
Commit
6a7a74cc
authored
Dec 22, 2016
by
Mathieu Faverge
Browse files
Fix remaining min/max
parent
18ff643a
Changes
10
Hide whitespace changes
Inline
Side-by-side
control/context.c
View file @
6a7a74cc
...
...
@@ -301,7 +301,7 @@ int MORSE_Set(MORSE_enum param, int value)
morse_warning
(
"MORSE_Set"
,
"autotuning has been automatically disable
\n
"
);
}
/* Limit ib to nb */
morse
->
ib
=
min
(
morse
->
nb
,
morse
->
ib
);
morse
->
ib
=
chameleon_
min
(
morse
->
nb
,
morse
->
ib
);
break
;
case
MORSE_INNER_BLOCK_SIZE
:
if
(
value
<=
0
)
{
...
...
cudablas/include/cudablas.h
View file @
6a7a74cc
...
...
@@ -88,19 +88,6 @@
**/
#define cudablas_error(k, str) fprintf(stderr, "%s: Parameter %d / %s\n", __func__, k, str)
/*******************************************************************************
* Global utilities
**/
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef roundup
#define roundup(a, b) (b <= 0) ? (a) : (((a) + (b)-1) & ~((b)-1))
#endif
/** ****************************************************************************
* LAPACK Constants
**/
...
...
runtime/starpu/codelets/codelet_zgelqt.c
View file @
6a7a74cc
...
...
@@ -149,7 +149,7 @@ static void cl_zgelqt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda
,
&
ldt
,
&
h_work
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_zgelqt
(
m
,
n
,
ib
,
A
,
lda
,
T
,
ldt
,
TAU
,
WORK
);
}
#endif
/* !defined(CHAMELEON_SIMULATION) */
...
...
@@ -182,7 +182,7 @@ static void cl_zgelqt_cuda_func(void *descr[], void *cl_arg)
/* Gather pointer to scratch data on host */
h_T
=
h_A
+
ib
*
n
;
h_TAU
=
h_T
+
ib
*
ib
;
h_W
=
h_TAU
+
max
(
m
,
n
);
h_W
=
h_TAU
+
chameleon_
max
(
m
,
n
);
h_D
=
h_W
+
ib
*
ib
;
stream
=
starpu_cuda_get_local_stream
();
...
...
runtime/starpu/codelets/codelet_zgeqrt.c
View file @
6a7a74cc
...
...
@@ -150,7 +150,7 @@ static void cl_zgeqrt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda
,
&
ldt
,
&
h_work
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_zgeqrt
(
m
,
n
,
ib
,
A
,
lda
,
T
,
ldt
,
TAU
,
WORK
);
}
...
...
@@ -182,7 +182,7 @@ static void cl_zgeqrt_cuda_func(void *descr[], void *cl_arg)
/* Gather pointer to scratch data on host */
h_T
=
h_A
+
m
*
ib
;
h_TAU
=
h_T
+
ib
*
ib
;
h_W
=
h_TAU
+
max
(
m
,
n
);
h_W
=
h_TAU
+
chameleon_
max
(
m
,
n
);
h_D
=
h_W
+
ib
*
ib
;
stream
=
starpu_cuda_get_local_stream
();
...
...
runtime/starpu/codelets/codelet_zgetrf_incpiv.c
View file @
6a7a74cc
...
...
@@ -162,7 +162,7 @@ static void cl_zgetrf_incpiv_cpu_func(void *descr[], void *cl_arg)
L
+=
ib
;
for
(
i
=
0
;
i
<
n
;
i
+=
ib
)
{
sb
=
min
(
ib
,
n
-
i
);
sb
=
chameleon_
min
(
ib
,
n
-
i
);
CORE_zlacpy
(
MorseUpperLower
,
sb
,
sb
,
A
+
(
i
*
lda
+
i
),
lda
,
L
+
(
i
*
ldl
),
ldl
);
CORE_ztrtri
(
MorseLower
,
MorseUnit
,
sb
,
L
+
(
i
*
ldl
),
ldl
,
&
info
);
...
...
runtime/starpu/codelets/codelet_ztslqt.c
View file @
6a7a74cc
...
...
@@ -170,7 +170,7 @@ static void cl_ztslqt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda1
,
&
lda2
,
&
ldt
,
&
h_work
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_ztslqt
(
m
,
n
,
ib
,
A1
,
lda1
,
A2
,
lda2
,
T
,
ldt
,
TAU
,
WORK
);
}
...
...
@@ -200,7 +200,7 @@ static void cl_ztslqt_cuda_func(void *descr[], void *cl_arg)
h_A2
=
(
cuDoubleComplex
*
)
RUNTIME_starpu_ws_getlocal
(
h_work
);
h_T
=
h_A2
+
ib
*
n
;
h_TAU
=
h_T
+
ib
*
n
;
h_W
=
h_TAU
+
max
(
m
,
n
);
h_W
=
h_TAU
+
chameleon_
max
(
m
,
n
);
h_D
=
h_W
+
ib
*
m
;
stream
=
starpu_cuda_get_local_stream
();
...
...
runtime/starpu/codelets/codelet_ztsqrt.c
View file @
6a7a74cc
...
...
@@ -160,7 +160,7 @@ static void cl_ztsqrt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda1
,
&
lda2
,
&
ldt
,
&
h_work
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_ztsqrt
(
m
,
n
,
ib
,
A1
,
lda1
,
A2
,
lda2
,
T
,
ldt
,
TAU
,
WORK
);
}
...
...
@@ -190,7 +190,7 @@ static void cl_ztsqrt_cuda_func(void *descr[], void *cl_arg)
h_A2
=
(
cuDoubleComplex
*
)
RUNTIME_starpu_ws_getlocal
(
h_work
);
h_T
=
h_A2
+
m
*
ib
;
h_TAU
=
h_T
+
ib
*
ib
;
h_W
=
h_TAU
+
max
(
m
,
n
);
h_W
=
h_TAU
+
chameleon_
max
(
m
,
n
);
h_D
=
h_W
+
ib
*
n
;
stream
=
starpu_cuda_get_local_stream
();
...
...
runtime/starpu/codelets/codelet_ztstrf.c
View file @
6a7a74cc
...
...
@@ -187,7 +187,7 @@ static void cl_ztstrf_cpu_func(void *descr[], void *cl_arg)
{
int
i
,
sb
;
for
(
i
=
0
;
i
<
n
;
i
+=
ib
)
{
sb
=
min
(
ib
,
n
-
i
);
sb
=
chameleon_
min
(
ib
,
n
-
i
);
CORE_zlacpy
(
MorseUpperLower
,
sb
,
sb
,
L
+
(
i
*
ldl
),
ldl
,
L
+
(
i
*
ldl
)
+
ib
,
ldl
);
CORE_ztrtri
(
MorseLower
,
MorseUnit
,
sb
,
L
+
(
i
*
ldl
)
+
ib
,
ldl
,
&
info
);
...
...
runtime/starpu/codelets/codelet_zttlqt.c
View file @
6a7a74cc
...
...
@@ -166,7 +166,7 @@ static void cl_zttlqt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda1
,
&
lda2
,
&
ldt
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_zttlqt
(
m
,
n
,
ib
,
A1
,
lda1
,
A2
,
lda2
,
T
,
ldt
,
TAU
,
WORK
);
}
...
...
runtime/starpu/codelets/codelet_zttqrt.c
View file @
6a7a74cc
...
...
@@ -166,7 +166,7 @@ static void cl_zttqrt_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args
(
cl_arg
,
&
m
,
&
n
,
&
ib
,
&
lda1
,
&
lda2
,
&
ldt
);
WORK
=
TAU
+
max
(
m
,
n
);
WORK
=
TAU
+
chameleon_
max
(
m
,
n
);
CORE_zttqrt
(
m
,
n
,
ib
,
A1
,
lda1
,
A2
,
lda2
,
T
,
ldt
,
TAU
,
WORK
);
}
...
...
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