Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
06fa75f4
Commit
06fa75f4
authored
3 years ago
by
LISITO Alycia
Committed by
Mathieu Faverge
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
testing: add standard api to syrk
parent
8299894d
No related branches found
No related tags found
1 merge request
!275
Add standard version to the blas3 testings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testing/testing_zsyrk.c
+75
-3
75 additions, 3 deletions
testing/testing_zsyrk.c
with
75 additions
and
3 deletions
testing/testing_zsyrk.c
+
75
−
3
View file @
06fa75f4
...
...
@@ -2,7 +2,7 @@
*
* @file testing_zsyrk.c
*
* @copyright 2019-202
1
Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* @copyright 2019-202
2
Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
...
...
@@ -13,7 +13,8 @@
* @author Lucas Barros de Assis
* @author Florent Pruvost
* @author Mathieu Faverge
* @date 2020-11-19
* @author Alycia Lisito
* @date 2022-02-04
* @precisions normal z -> z c d s
*
*/
...
...
@@ -108,6 +109,77 @@ testing_zsyrk_desc( run_arg_list_t *args, int check )
return
hres
;
}
int
testing_zsyrk_std
(
run_arg_list_t
*
args
,
int
check
)
{
testdata_t
test_data
=
{
.
args
=
args
};
int
hres
=
0
;
/* Read arguments */
int
nb
=
run_arg_get_int
(
args
,
"nb"
,
320
);
cham_trans_t
trans
=
run_arg_get_trans
(
args
,
"trans"
,
ChamNoTrans
);
cham_uplo_t
uplo
=
run_arg_get_uplo
(
args
,
"uplo"
,
ChamUpper
);
int
N
=
run_arg_get_int
(
args
,
"N"
,
1000
);
int
K
=
run_arg_get_int
(
args
,
"K"
,
N
);
int
LDA
=
run_arg_get_int
(
args
,
"LDA"
,
(
(
trans
==
ChamNoTrans
)
?
N
:
K
)
);
int
LDC
=
run_arg_get_int
(
args
,
"LDC"
,
N
);
CHAMELEON_Complex64_t
alpha
=
testing_zalea
();
CHAMELEON_Complex64_t
beta
=
testing_zalea
();
CHAMELEON_Complex64_t
bump
=
testing_zalea
();
int
seedA
=
run_arg_get_int
(
args
,
"seedA"
,
random
()
);
int
seedC
=
run_arg_get_int
(
args
,
"seedC"
,
random
()
);
/* Descriptors */
int
Am
,
An
;
CHAMELEON_Complex64_t
*
A
,
*
C
,
*
Cinit
;
alpha
=
run_arg_get_complex64
(
args
,
"alpha"
,
alpha
);
beta
=
run_arg_get_complex64
(
args
,
"beta"
,
beta
);
bump
=
run_arg_get_complex64
(
args
,
"bump"
,
bump
);
CHAMELEON_Set
(
CHAMELEON_TILE_SIZE
,
nb
);
/* Calculates the dimensions according to the transposition */
if
(
trans
==
ChamNoTrans
)
{
Am
=
N
;
An
=
K
;
}
else
{
Am
=
K
;
An
=
N
;
}
/* Creates the matrices */
A
=
malloc
(
LDA
*
An
*
sizeof
(
CHAMELEON_Complex64_t
)
);
C
=
malloc
(
LDC
*
N
*
sizeof
(
CHAMELEON_Complex64_t
)
);
/* Fills the matrix with random values */
CHAMELEON_zplrnt
(
Am
,
An
,
A
,
LDA
,
seedA
);
CHAMELEON_zplgsy
(
bump
,
uplo
,
N
,
C
,
LDC
,
seedC
);
/* Calculates the product */
testing_start
(
&
test_data
);
hres
=
CHAMELEON_zsyrk
(
uplo
,
trans
,
N
,
K
,
alpha
,
A
,
LDA
,
beta
,
C
,
LDC
);
test_data
.
hres
=
hres
;
testing_stop
(
&
test_data
,
flops_zsyrk
(
K
,
N
)
);
/* Checks the solution */
if
(
check
)
{
Cinit
=
malloc
(
LDC
*
N
*
sizeof
(
CHAMELEON_Complex64_t
)
);
CHAMELEON_zplgsy
(
bump
,
uplo
,
N
,
Cinit
,
LDC
,
seedC
);
// hres += check_zsyrk( args, ChamSymmetric, uplo, trans, alpha, descA, NULL,
// beta, descCinit, descC );
free
(
Cinit
);
}
free
(
A
);
free
(
C
);
return
hres
;
}
testing_t
test_zsyrk
;
const
char
*
zsyrk_params
[]
=
{
"mtxfmt"
,
"nb"
,
"trans"
,
"uplo"
,
"n"
,
"k"
,
"lda"
,
"ldc"
,
"alpha"
,
"beta"
,
"seedA"
,
"seedC"
,
"bump"
,
NULL
};
...
...
@@ -127,7 +199,7 @@ testing_zsyrk_init( void )
test_zsyrk
.
output
=
zsyrk_output
;
test_zsyrk
.
outchk
=
zsyrk_outchk
;
test_zsyrk
.
fptr_desc
=
testing_zsyrk_desc
;
test_zsyrk
.
fptr_std
=
NULL
;
test_zsyrk
.
fptr_std
=
testing_zsyrk_std
;
test_zsyrk
.
next
=
NULL
;
testing_register
(
&
test_zsyrk
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment