Mentions légales du service

Skip to content
Snippets Groups Projects
Commit bd7d2bf0 authored by PRUVOST Florent's avatar PRUVOST Florent Committed by Mathieu Faverge
Browse files

Fix example lapack_to_chameleon step7: descB instead of descA in the plrnt_cpu function

parent 9b9b6d1a
No related branches found
No related tags found
1 merge request!446Example comm split
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* to fill the matrix with random data, CHAMELEON_dLapack_to_Tile() to fill the matrix * to fill the matrix with random data, CHAMELEON_dLapack_to_Tile() to fill the matrix
* with data stored in a lapack-like buffer, or CHAMELEON_Desc_Create_User() that can be used * with data stored in a lapack-like buffer, or CHAMELEON_Desc_Create_User() that can be used
* to describe an arbitrary tile matrix structure. * to describe an arbitrary tile matrix structure.
* In this example, the map callback function are just wrapper towards CORE_xxx() functions, so the output * In this example, the map function are just wrapper towards CORE_xxx() functions, so the output
* of the program step7 should be exactly similar to that of step6. * of the program step7 should be exactly similar to that of step6.
* The difference is that the funtion used to fill the tiles is provided by the user, * The difference is that the funtion used to fill the tiles is provided by the user,
* and therefore this approach is much more flexible. * and therefore this approach is much more flexible.
...@@ -133,7 +133,7 @@ int main(int argc, char *argv[]) { ...@@ -133,7 +133,7 @@ int main(int argc, char *argv[]) {
GRID_P, GRID_Q); GRID_P, GRID_Q);
/* generate A matrix with random values such that it is spd. /* generate A matrix with random values such that it is spd.
We use the callback function Cham_build_plgsy() defined in step7.h We use the function Cham_build_plgsy() defined in step7.h
In this example, it is just a wrapper toward CORE_dplgsy() */ In this example, it is just a wrapper toward CORE_dplgsy() */
struct data_pl plgsy_args = { (double)N, 51 }; struct data_pl plgsy_args = { (double)N, 51 };
struct cham_map_operator_s plgsy_op = { struct cham_map_operator_s plgsy_op = {
...@@ -148,7 +148,8 @@ int main(int argc, char *argv[]) { ...@@ -148,7 +148,8 @@ int main(int argc, char *argv[]) {
}; };
CHAMELEON_mapv_Tile( ChamUpperLower, 1, &plgsy_data, &plgsy_op, &plgsy_args ); CHAMELEON_mapv_Tile( ChamUpperLower, 1, &plgsy_data, &plgsy_op, &plgsy_args );
/* generate RHS with the callback Cham_build_callback_plrnt() */ /* generate RHS with the function Cham_build_plrnt_cpu() defined in
step7.h */
struct data_pl plrnt_args = { 0., 5673 }; struct data_pl plrnt_args = { 0., 5673 };
struct cham_map_operator_s plrnt_op = { struct cham_map_operator_s plrnt_op = {
.name = "plrnt", .name = "plrnt",
...@@ -158,7 +159,7 @@ int main(int argc, char *argv[]) { ...@@ -158,7 +159,7 @@ int main(int argc, char *argv[]) {
}; };
struct cham_map_data_s plrnt_data = { struct cham_map_data_s plrnt_data = {
.access = ChamW, .access = ChamW,
.desc = descA, .desc = descB,
}; };
CHAMELEON_mapv_Tile( ChamUpperLower, 1, &plrnt_data, &plrnt_op, &plrnt_args ); CHAMELEON_mapv_Tile( ChamUpperLower, 1, &plrnt_data, &plrnt_op, &plrnt_args );
......
...@@ -65,11 +65,11 @@ static void init_iparam(int iparam[IPARAM_SIZEOF]){ ...@@ -65,11 +65,11 @@ static void init_iparam(int iparam[IPARAM_SIZEOF]){
} }
/** /**
* Callback function used to build matrix blocks * Function used to build matrix blocks
* Cham_build_callback_plgsy : random symmetric positive definite * Cham_build_plgsy_cpu : random symmetric positive definite
* Cham_build_callback_plrnt : random general * Cham_build_plrnt_cpu : random general
* These 2 functions use data_pl to get data on the matrix to build, passed through the opaque pointer 'user_data' * These 2 functions use data_pl to get data on the matrix to build, passed through the opaque pointer 'op_args'
* The callback is expected to build the block of matrix (m,n) and store it in tile->mat * The function is expected to build the block of matrix (m,n) and store it in tileA
*/ */
struct data_pl { struct data_pl {
double bump; double bump;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment