QUDA
v0.5.0
A library for QCD on GPUs
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
quda
include
malloc_quda.h
Go to the documentation of this file.
1
#ifndef _MALLOC_QUDA_H
2
#define _MALLOC_QUDA_H
3
4
#include <cstdlib>
5
6
namespace
quda {
7
8
void
printPeakMemUsage
();
9
void
assertAllMemFree
();
10
11
/*
12
* The following functions should not be called directly. Use the
13
* macros below instead.
14
*/
15
void
*
device_malloc_
(
const
char
*func,
const
char
*file,
int
line,
size_t
size);
16
void
*
safe_malloc_
(
const
char
*func,
const
char
*file,
int
line,
size_t
size);
17
void
*
pinned_malloc_
(
const
char
*func,
const
char
*file,
int
line,
size_t
size);
18
void
*
mapped_malloc_
(
const
char
*func,
const
char
*file,
int
line,
size_t
size);
19
void
device_free_
(
const
char
*func,
const
char
*file,
int
line,
void
*ptr);
20
void
host_free_
(
const
char
*func,
const
char
*file,
int
line,
void
*ptr);
21
22
}
23
24
#define device_malloc(size) quda::device_malloc_(__func__, __FILE__, __LINE__, size)
25
#define safe_malloc(size) quda::safe_malloc_(__func__, __FILE__, __LINE__, size)
26
#define pinned_malloc(size) quda::pinned_malloc_(__func__, __FILE__, __LINE__, size)
27
#define mapped_malloc(size) quda::mapped_malloc_(__func__, __FILE__, __LINE__, size)
28
#define device_free(ptr) quda::device_free_(__func__, __FILE__, __LINE__, ptr)
29
#define host_free(ptr) quda::host_free_(__func__, __FILE__, __LINE__, ptr)
30
31
#endif // _MALLOC_QUDA_H
Generated on Wed Mar 20 2013 12:52:14 for QUDA by
1.8.2