Skip to content
Snippets Groups Projects
Commit 61e8b696 authored by Moises Fernandez's avatar Moises Fernandez
Browse files

A function that initializes the GPU

parent a8136595
No related branches found
No related tags found
No related merge requests found
#include "sync_check.h"
#include <fstream>
void init_gpu(){
int device;
cudaGetDevice(&device);
printf ("\n...................In the GPU launcher on the device %d...................\n", device);
int *q;
cudaMalloc((void **)&q, sizeof(int));
cudaFree(q);
sync_check("init_gpu");
}
double timeval_diff(struct timeval *a, struct timeval *b){
return (double)(a->tv_sec +(double)a->tv_usec/1000000) - (double)(b->tv_sec +(double)b->tv_usec/1000000);
}
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