Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rtgpgpu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PTASK
rtgpgpu
Commits
c18dc1de
Commit
c18dc1de
authored
5 years ago
by
zahoussem
Browse files
Options
Downloads
Patches
Plain Diff
platform description
parent
843331fb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/user.h
+3
-4
3 additions, 4 deletions
inc/user.h
src/tools.cu
+15
-3
15 additions, 3 deletions
src/tools.cu
src/user.cu
+12
-6
12 additions, 6 deletions
src/user.cu
with
30 additions
and
13 deletions
inc/user.h
+
3
−
4
View file @
c18dc1de
...
...
@@ -5,8 +5,7 @@
#include
<tuple>
#include
<iostream>
// do not modify
template
<
typename
...
Arguments
>
struct
kernel_t
{
void
(
*
kernel_c
)(
Arguments
...);
...
...
@@ -15,8 +14,8 @@ struct kernel_t {
int
gs
;
};
void
init_kernel_listing
();
// user modifications must be apported here
std
::
tuple
<
struct
kernel_t
<
int
*
,
int
*
,
int
*
,
int
>
*
,
struct
kernel_t
<
int
*
,
int
*
,
int
*>
*
>
get_listing
();
void
init_kernel_listing
();
#endif
This diff is collapsed.
Click to expand it.
src/tools.cu
+
15
−
3
View file @
c18dc1de
...
...
@@ -78,12 +78,22 @@ static __device__ __inline__ void __allocate_to_sm(int sm){
static
__device__
__inline__
void
__allocate_to_sm
(
int
cond
){
if
(
cond
)
asm
(
"trap;"
);
}
struct
scheduler_t
*
scheduler
;
// Houssam : need to declare indexes methods
void
pruda_alloc_sm
(
int
sm
){}
void
pruda_alloc_sm
(
int
sm
){
}
int
pruda_get_sm
(){
return
0
;
...
...
@@ -92,8 +102,10 @@ int pruda_check_sm(int sm){
return
0
;
}
void
pruda_thread_exit
(){}
void
pruda_kernel_abort
(){}
void
pruda_thread_exit
(){
}
void
pruda_kernel_abort
(){
}
...
...
This diff is collapsed.
Click to expand it.
src/user.cu
+
12
−
6
View file @
c18dc1de
#include
"../inc/user.h"
// the list of the kernels must be given here
struct
kernel_t
<
int
*
,
int
*
,
int
*
,
int
>
m_1
;
struct
kernel_t
<
int
*
,
int
*
,
int
*>
m_2
;
std
::
tuple
<
decltype
(
m_1
)
*
,
decltype
(
m_2
)
*
>
tasks
;
decltype
(
tasks
)
get_listing
(){
return
tasks
;
}
void
init_kernel_listing
(){
// user must add its kernels here.
tasks
=
std
::
make_tuple
(
&
m_1
,
&
m_2
);
}
// do not modify
std
::
tuple
<
decltype
(
m_1
)
*
,
decltype
(
m_2
)
*
>
tasks
;
decltype
(
tasks
)
get_listing
(){
return
tasks
;
}
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