Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argupta
openfpm_vcluster
Commits
e105e6ef
Commit
e105e6ef
authored
Jan 09, 2019
by
incardon
Browse files
Adding temporal cuda memory
parent
309c3143
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/VCluster/VCluster.cpp
View file @
e105e6ef
...
...
@@ -23,6 +23,14 @@ size_t tot_recv = 0;
std
::
string
program_name
;
#ifdef CUDA_GPU
#include "memory/CudaMemory.cuh"
CudaMemory
mem_tmp
;
#endif
// Segmentation fault signal handler
void
bt_sighandler
(
int
sig
,
siginfo_t
*
info
,
void
*
ctx_p
)
{
...
...
src/VCluster/VCluster.hpp
View file @
e105e6ef
...
...
@@ -14,6 +14,10 @@
#include "VCluster_meta_function.hpp"
#include "util/math_util_complex.hpp"
#ifdef CUDA_GPU
extern
CudaMemory
mem_tmp
;
#endif
void
bt_sighandler
(
int
sig
,
siginfo_t
*
info
,
void
*
ctx
);
/*! \brief Implementation of VCluster class
...
...
@@ -986,6 +990,13 @@ static inline void openfpm_init(int *argc, char ***argv)
openfpm
::
math
::
init_getFactorization
();
ofp_initialized
=
true
;
#ifdef CUDA_GPU
// Initialize temporal memory
mem_tmp
.
incRef
();
#endif
}
...
...
@@ -1004,6 +1015,14 @@ static inline void openfpm_finalize()
delete_global_v_cluster_private
();
ofp_initialized
=
false
;
#ifdef CUDA_GPU
// Release memory
mem_tmp
.
destroy
();
mem_tmp
.
decRef
();
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment