mirror of
https://github.com/augustin64/projet-tipe
synced 2025-02-02 19:39:39 +01:00
Improve consistency across headers
This commit is contained in:
parent
5bd5397356
commit
6071a3608b
@ -13,36 +13,36 @@ void make_convolution_cpu(Kernel_cnn* kernel, float*** input, float*** output, i
|
||||
*/
|
||||
void make_convolution(Kernel_cnn* kernel, float*** input, float*** output, int output_dim);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Effectue un average pooling avec stride=size
|
||||
*/
|
||||
void make_average_pooling(float*** input, float*** output, int size, int output_depth, int output_dim);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
void make_average_pooling(float*** input, float*** output, int size, int output_depth, int output_dim);
|
||||
|
||||
/*
|
||||
* Effectue un max pooling avec stride=size
|
||||
*/
|
||||
void make_max_pooling(float*** input, float*** output, int size, int output_depth, int output_dim);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
void make_max_pooling(float*** input, float*** output, int size, int output_depth, int output_dim);
|
||||
|
||||
/*
|
||||
* Effectue une full connection
|
||||
*/
|
||||
void make_dense(Kernel_nn* kernel, float* input, float* output, int size_input, int size_output);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
void make_dense(Kernel_nn* kernel, float* input, float* output, int size_input, int size_output);
|
||||
|
||||
/*
|
||||
* Effectue une full connection qui passe d'une matrice à un vecteur
|
||||
*/
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
void make_dense_linearised(Kernel_nn* kernel, float*** input, float* output, int depth_input, int dim_input, int size_output);
|
||||
|
||||
#endif
|
@ -18,41 +18,65 @@ typedef struct Memory {
|
||||
struct Memory* next; // Élément suivant
|
||||
} Memory;
|
||||
|
||||
// Renvoie le nombre d'allocations totales dans la mémoire
|
||||
|
||||
/* Get memory stats for tests */
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Renvoie le nombre d'allocations totales dans la mémoire
|
||||
*/
|
||||
int get_memory_distinct_allocations();
|
||||
|
||||
// Fonction récursive correspondante
|
||||
/*
|
||||
* Fonction récursive correspondante
|
||||
*/
|
||||
int get_distinct_allocations(Memory* mem);
|
||||
|
||||
// Renvoie le nombre d'éléments dans la liste chaînée représentant la mémoire
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Renvoie le nombre d'éléments dans la liste chaînée représentant la mémoire
|
||||
*/
|
||||
int get_memory_blocks_number();
|
||||
|
||||
// Renvoie la taille d'une liste chaînée
|
||||
/*
|
||||
* Renvoie la taille d'une liste chaînée
|
||||
*/
|
||||
int get_length(Memory* mem);
|
||||
|
||||
// Créer un bloc de mémoire de taille size
|
||||
|
||||
|
||||
/*
|
||||
* Créer un bloc de mémoire de taille size
|
||||
*/
|
||||
Memory* create_memory_block(size_t size);
|
||||
|
||||
// Allouer un élément de taille size dans mem
|
||||
/*
|
||||
* Allouer un élément de taille size dans mem
|
||||
*/
|
||||
void* allocate_memory(size_t size, Memory* mem);
|
||||
|
||||
// Essayer de libérer le pointeur représenté par ptr dans mem
|
||||
/*
|
||||
* Essayer de libérer le pointeur représenté par ptr dans mem
|
||||
*/
|
||||
Memory* free_memory(void* ptr, Memory* mem);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Alloue de la mémoire partagée CUDA si CUDA est activé
|
||||
*/
|
||||
void* nalloc(size_t sz);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Libérer le mémoire allouée avec nalloc
|
||||
*/
|
||||
void gree(void* ptr);
|
||||
|
||||
#endif
|
@ -30,12 +30,12 @@ inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=t
|
||||
*/
|
||||
int i_div_up(int a, int b);
|
||||
|
||||
/*
|
||||
* Vérification de la compatibilité CUDA
|
||||
*/
|
||||
#ifdef __CUDACC__
|
||||
extern "C"
|
||||
#endif
|
||||
/*
|
||||
* Vérification de la compatibilité CUDA
|
||||
*/
|
||||
bool check_cuda_compatibility();
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user