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
8667b7fe
Commit
8667b7fe
authored
4 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
descriptors: Add recursive descriptors
parent
a8087ff2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!256
Update on descriptors
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
compute/CMakeLists.txt
+1
-0
1 addition, 0 deletions
compute/CMakeLists.txt
control/descriptor_rec.c
+102
-0
102 additions, 0 deletions
control/descriptor_rec.c
include/chameleon.h
+4
-0
4 additions, 0 deletions
include/chameleon.h
with
107 additions
and
0 deletions
compute/CMakeLists.txt
+
1
−
0
View file @
8667b7fe
...
...
@@ -36,6 +36,7 @@ set(CHAMELEON_CONTROL
../control/context.c
../control/control.c
../control/descriptor.c
../control/descriptor_rec.c
../control/workspace.c
../control/tile.c
../control/chameleon_f77.c
...
...
This diff is collapsed.
Click to expand it.
control/descriptor_rec.c
0 → 100644
+
102
−
0
View file @
8667b7fe
/**
*
* @file descriptor_rec.c
*
* @copyright 2009-2014 The University of Tennessee and The University of
* Tennessee Research Foundation. All rights reserved.
* @copyright 2012-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon descriptors routines
*
* @version 1.0.0
* @author Mathieu Faverge
* @author Gwenole Lucas
* @date 2020-03-03
*
*/
#define _GNU_SOURCE 1
#include
"control/common.h"
#include
<stdlib.h>
#include
<stdio.h>
#include
"chameleon/runtime.h"
static
int
chameleon_recdesc_create
(
const
char
*
name
,
CHAM_desc_t
**
descptr
,
void
*
mat
,
cham_flttype_t
dtyp
,
int
*
mb
,
int
*
nb
,
int
lm
,
int
ln
,
int
m
,
int
n
,
int
p
,
int
q
,
blkaddr_fct_t
get_blkaddr
,
blkldd_fct_t
get_blkldd
,
blkrankof_fct_t
get_rankof
)
{
CHAM_desc_t
*
desc
;
int
rc
;
/* Let's make sure we have at least one couple (mb, nb) defined */
assert
(
(
mb
[
0
]
>
0
)
&&
(
nb
[
0
]
>
0
)
);
/* Create the current layer descriptor */
rc
=
CHAMELEON_Desc_Create_User
(
descptr
,
mat
,
dtyp
,
mb
[
0
],
nb
[
0
],
mb
[
0
]
*
nb
[
0
],
lm
,
ln
,
0
,
0
,
m
,
n
,
1
,
1
,
get_blkaddr
,
get_blkldd
,
get_rankof
);
desc
=
*
descptr
;
desc
->
name
=
name
;
if
(
rc
!=
CHAMELEON_SUCCESS
)
{
return
rc
;
}
/* Move to the next tile size to recurse */
mb
++
;
nb
++
;
if
(
(
mb
[
0
]
<=
0
)
||
(
nb
[
0
]
<=
0
)
)
{
return
CHAMELEON_SUCCESS
;
}
for
(
n
=
0
;
n
<
desc
->
nt
;
n
++
)
{
for
(
m
=
0
;
m
<
desc
->
mt
;
m
++
)
{
CHAM_desc_t
*
tiledesc
;
CHAM_tile_t
*
tile
;
int
tempmm
,
tempnn
;
char
*
subname
;
tile
=
desc
->
get_blktile
(
desc
,
m
,
n
);
tempmm
=
m
==
desc
->
mt
-
1
?
desc
->
m
-
m
*
desc
->
mb
:
desc
->
mb
;
tempnn
=
n
==
desc
->
nt
-
1
?
desc
->
n
-
n
*
desc
->
nb
:
desc
->
nb
;
asprintf
(
&
subname
,
"%s[%d,%d]"
,
name
,
m
,
n
);
chameleon_recdesc_create
(
subname
,
&
tiledesc
,
tile
->
mat
,
desc
->
dtyp
,
mb
,
nb
,
tile
->
ld
,
tempnn
,
/* Abuse as ln is not used */
tempmm
,
tempnn
,
1
,
1
,
/* can recurse only on local data */
chameleon_getaddr_cm
,
chameleon_getblkldd_cm
,
NULL
);
tile
->
format
=
CHAMELEON_TILE_DESC
;
tile
->
mat
=
tiledesc
;
if
(
rc
!=
CHAMELEON_SUCCESS
)
{
return
rc
;
}
}
}
return
CHAMELEON_SUCCESS
;
}
int
CHAMELEON_Recursive_Desc_Create
(
CHAM_desc_t
**
descptr
,
void
*
mat
,
cham_flttype_t
dtyp
,
int
*
mb
,
int
*
nb
,
int
lm
,
int
ln
,
int
m
,
int
n
,
int
p
,
int
q
,
blkaddr_fct_t
get_blkaddr
,
blkldd_fct_t
get_blkldd
,
blkrankof_fct_t
get_rankof
)
{
/*
* The first layer must be allocated, otherwise we will give unitialized
* pointers to the lower layers
*/
assert
(
(
mat
!=
CHAMELEON_MAT_ALLOC_TILE
)
&&
(
mat
!=
CHAMELEON_MAT_OOC
)
);
return
chameleon_recdesc_create
(
"A"
,
descptr
,
mat
,
dtyp
,
mb
,
nb
,
lm
,
ln
,
m
,
n
,
p
,
q
,
get_blkaddr
,
get_blkldd
,
get_rankof
);
}
This diff is collapsed.
Click to expand it.
include/chameleon.h
+
4
−
0
View file @
8667b7fe
...
...
@@ -164,6 +164,10 @@ int CHAMELEON_Request_Create (RUNTIME_request_t **request);
int
CHAMELEON_Request_Destroy
(
RUNTIME_request_t
*
request
);
int
CHAMELEON_Request_Set
(
RUNTIME_request_t
*
request
,
int
param
,
int
value
);
int
CHAMELEON_Recursive_Desc_Create
(
CHAM_desc_t
**
descptr
,
void
*
mat
,
cham_flttype_t
dtyp
,
int
*
mb
,
int
*
nb
,
int
lm
,
int
ln
,
int
m
,
int
n
,
int
p
,
int
q
,
blkaddr_fct_t
get_blkaddr
,
blkldd_fct_t
get_blkldd
,
blkrankof_fct_t
get_rankof
);
/**
*
* @ingroup Control
...
...
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