Skip to content
Snippets Groups Projects
Commit c18dc1de authored by zahoussem's avatar zahoussem
Browse files

platform description

parent 843331fb
Branches
No related tags found
No related merge requests found
......@@ -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
......@@ -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(){
}
......
#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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment