QUDA
v1.1.0
A library for QCD on GPUs
quda
include
object.h
Go to the documentation of this file.
1
11
#pragma once
12
13
#include <
malloc_quda.h
>
14
15
namespace
quda
{
16
17
class
Object
{
18
19
20
public
:
21
inline
Object
() { }
22
inline
virtual
~Object
() { }
23
24
inline
static
void
*
operator
new
(std::size_t size) {
25
return
safe_malloc
(size);
26
}
27
28
inline
static
void
operator
delete
(
void
* p) {
29
host_free
(p);
30
}
31
32
inline
static
void
*
operator
new
[](std::size_t size) {
33
return
safe_malloc
(size);
34
}
35
36
inline
static
void
operator
delete
[](
void
* p) {
37
host_free
(p);
38
}
39
};
40
41
}
// namespace quda
quda::Object
Definition:
object.h:17
quda::Object::~Object
virtual ~Object()
Definition:
object.h:22
quda::Object::Object
Object()
Definition:
object.h:21
malloc_quda.h
safe_malloc
#define safe_malloc(size)
Definition:
malloc_quda.h:106
host_free
#define host_free(ptr)
Definition:
malloc_quda.h:115
quda
Definition:
blas_lapack.h:24
Generated on Thu Oct 28 2021 16:10:26 for QUDA by
1.9.1