4.1.5.2.1 : Le fichier asterics_cuda.h
Développons le fichier asterics_cuda.h :

1
2
3
4
5
6
7
8
9
10
11
12
#ifndef __ASTERICS_CUDA_H__
#define __ASTERICS_CUDA_H__

#include <stdio.h>
#include <string>

int asterics_getNbCudaDevice();
void asterics_getGpuInfo(int & maxNbThreadPerBlockX, int & maxNbBlockX, int & warpSize, int deviceIndex);
void asterics_getGpuInfoMem(size_t & maxNbThreadPerBlockX, size_t & maxNbBlockX, size_t & memSize, int deviceIndex);
int asterics_setDevice(const std::string & uuidSelectedDevice);

#endif


Le fichier asterics_cuda.h complet.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/

#ifndef __ASTERICS_CUDA_H__
#define __ASTERICS_CUDA_H__

#include <stdio.h>
#include <string>

int asterics_getNbCudaDevice();
void asterics_getGpuInfo(int & maxNbThreadPerBlockX, int & maxNbBlockX, int & warpSize, int deviceIndex);
void asterics_getGpuInfoMem(size_t & maxNbThreadPerBlockX, size_t & maxNbBlockX, size_t & memSize, int deviceIndex);
int asterics_setDevice(const std::string & uuidSelectedDevice);

#endif


Vous pouvez télécharger le fichier ici.