Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_devices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_devices
Commits
98033dea
Commit
98033dea
authored
6 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Plain Diff
Merge branch 'GPU_test' of git.mpi-cbg.de:openfpm/openfpm_devices into GPU_test
parents
cd05d830
46e4994c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure.ac
+2
-2
2 additions, 2 deletions
configure.ac
src/Makefile.am
+14
-0
14 additions, 0 deletions
src/Makefile.am
src/memory/ExtPreAlloc.hpp
+2
-0
2 additions, 0 deletions
src/memory/ExtPreAlloc.hpp
src/memory/HeapMemory.cpp
+4
-2
4 additions, 2 deletions
src/memory/HeapMemory.cpp
with
22 additions
and
4 deletions
configure.ac
+
2
−
2
View file @
98033dea
...
...
@@ -47,8 +47,8 @@ fi
prefix="$prefix/openfpm_devices"
echo "Installation dir is: $prefix"
AC_PROG_RANLIB
A
M_PROG_AR
LT_INIT
A
C_SUBST([LIBTOOL_DEPS])
# Checks for programs.
AC_PROG_CXX
...
...
This diff is collapsed.
Click to expand it.
src/Makefile.am
+
14
−
0
View file @
98033dea
...
...
@@ -7,6 +7,10 @@ endif
LINKLIBS
=
$(
PTHREAD_LIBS
)
$(
OPT_LIBS
)
$(
BOOST_LDFLAGS
)
$(
BOOST_PROGRAM_OPTIONS_LIB
)
$(
CUDA_LIBS
)
$(
BOOST_THREAD_LIB
)
LIBTOOL_DEPS
=
@LIBTOOL_DEPS@
libtool
:
$(LIBTOOL_DEPS)
$(
SHELL
)
./config.status libtool
noinst_PROGRAMS
=
mem
mem_SOURCES
=
main.cpp memory/HeapMemory.cpp
$(
CUDA_SOURCES
)
Memleak_check.cpp
mem_CXXFLAGS
=
$(
INCLUDES_PATH
)
$(
BOOST_CPPFLAGS
)
-I
/usr/local/include
...
...
@@ -22,6 +26,16 @@ libofpmmemory_se2_a_SOURCES = memory/HeapMemory.cpp $(CUDA_SOURCES) memory/PtrMe
libofpmmemory_se2_a_CXXFLAGS
=
$(
INCLUDES_PATH
)
$(
BOOST_CPPFLAGS
)
-I
/usr/local/include
-DSE_CLASS2
libofpmmemory_se2_a_CFLAGS
=
lib_LTLIBRARIES
=
libofpmmemory.la libofpmmemory_se2.la
libofpmmemory_la_SOURCES
=
memory/HeapMemory.cpp
$(
CUDA_SOURCES
)
memory/PtrMemory.cpp Memleak_check.cpp
libofpmmemory_la_CXXFLAGS
=
$(
INCLUDES_PATH
)
$(
BOOST_CPPFLAGS
)
-I
/usr/local/include
libofpmmemory_la_CFLAGS
=
libofpmmemory_se2_la_SOURCES
=
memory/HeapMemory.cpp
$(
CUDA_SOURCES
)
memory/PtrMemory.cpp Memleak_check.cpp
libofpmmemory_se2_la_CXXFLAGS
=
$(
INCLUDES_PATH
)
$(
BOOST_CPPFLAGS
)
-I
/usr/local/include
-DSE_CLASS2
libofpmmemory_se2_la_CFLAGS
=
nobase_include_HEADERS
=
memory/ExtPreAlloc.hpp memory/BHeapMemory.hpp memory/HeapMemory.hpp memory/memory.hpp memory/PtrMemory.hpp
\
Memleak_check.hpp util/print_stack.hpp ptr_info.hpp
\
util/se_util.hpp
...
...
This diff is collapsed.
Click to expand it.
src/memory/ExtPreAlloc.hpp
+
2
−
0
View file @
98033dea
...
...
@@ -8,6 +8,8 @@
#define EXTPREALLOC_HPP_
#include
<stddef.h>
#include
"memory.hpp"
#include
<iostream>
/*! Preallocated memory sequence
*
...
...
This diff is collapsed.
Click to expand it.
src/memory/HeapMemory.cpp
+
4
−
2
View file @
98033dea
...
...
@@ -11,6 +11,8 @@
#include
<iostream>
#include
<cstdint>
static
const
int
extra_pad
=
512
;
// If debugging mode include memory leak check
#ifdef SE_CLASS2
#include
"Memleak_check.hpp"
...
...
@@ -26,7 +28,7 @@ bool HeapMemory::allocate(size_t sz)
{
//! Allocate the device memory
if
(
dm
==
NULL
)
dmOrig
=
new
byte
[
sz
+
alignement
];
dmOrig
=
new
byte
[
sz
+
alignement
+
extra_pad
];
else
std
::
cerr
<<
__FILE__
<<
":"
<<
__LINE__
<<
" error memory already allocated
\n
"
;
...
...
@@ -180,7 +182,7 @@ bool HeapMemory::resize(size_t sz)
//! Create a new buffer if sz is bigger than the actual size
byte
*
tdm
;
byte
*
tdmOrig
;
tdmOrig
=
new
byte
[
sz
+
alignement
];
tdmOrig
=
new
byte
[
sz
+
alignement
+
extra_pad
];
#ifdef SE_CLASS2
check_new
(
tdmOrig
,
sz
+
alignement
,
HEAPMEMORY_EVENT
,
0
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment