From cb3e2da584acb5323640ba502d2721e11879c038 Mon Sep 17 00:00:00 2001 From: felsabbagh3 Date: Mon, 4 Nov 2019 18:59:39 -0500 Subject: [PATCH] Added vx_tempelate.c --- runtime/vx_tempelate.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 runtime/vx_tempelate.c diff --git a/runtime/vx_tempelate.c b/runtime/vx_tempelate.c new file mode 100644 index 00000000..5689a513 --- /dev/null +++ b/runtime/vx_tempelate.c @@ -0,0 +1,42 @@ + + + +#include "io/io.h" // Printing functions +#include "intrinsics/instrinsics.h" // vx_threadID and vx_WarpID + +struct args +{ + void * data; +}; + + +void function(void * arg) +{ + struct args * real_arg = (struct args *) arg; + + unsigned tid = vx_threadID(); + unsigned wid = vx_WarpID(); + + __if(something) // Control divergent if + { + + } + __else + { + + } + __endif +} + +int main() +{ + + void * data = vx_loadfile("filename.txt"); // The raw char data will be returned by vx_loadfile + + struct args arg; + arg.data = data; + + vx_spawnWarps(numWarps, numThreads, function, &data); + + +} \ No newline at end of file