Skip to content
Snippets Groups Projects
Commit 95ed584d authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing BHeapMemory copy

parent 36227626
No related branches found
No related tags found
No related merge requests found
......@@ -202,12 +202,8 @@ AC_SUBST(BOOST_CPPFLAGS)
####### Checking for GPU support
AX_CUDA
if test x"$NVCC_EXIST" = x"yes"; then
AC_MSG_CHECKING(whether to build with GPU support)
gpu_support=yes
AC_ARG_ENABLE(gpu,
gpu_support=yes
AC_ARG_ENABLE(gpu,
AC_HELP_STRING(
[--enable-gpu],
[enable gpu support]
......@@ -215,15 +211,18 @@ if test x"$NVCC_EXIST" = x"yes"; then
gpu_support="$enableval"
)
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AC_DEFINE([CUDA_GPU],[],[CUDA GPU support])
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AX_CUDA
if test x"$NVCC_EXIST" = x"yes"; then
AC_DEFINE([CUDA_GPU],[],[CUDA GPU support])
else
gpu_support=no
fi
else
gpu_support=no
fi
# Set this conditional if cuda is wanted
#
......
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_THREAD_LIB)
if BUILDCUDA
CUDA_SOURCES=memory/CudaMemory.cu
else
CUDA_SOURCES=
endif
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_THREAD_LIB)
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
......
......@@ -134,6 +134,30 @@ public:
return HeapMemory::size();
}
/*! \brief Copy the memory
*
*
*/
BHeapMemory & operator=(const BHeapMemory & mem)
{
buf_sz = mem.buf_sz;
static_cast<HeapMemory *>(this)->operator=(mem);
return *this;
}
/*! \brief Copy the memory
*
*
*/
BHeapMemory & operator=(BHeapMemory && mem)
{
buf_sz = mem.buf_sz;
static_cast<HeapMemory *>(this)->operator=(mem);
return *this;
}
/*! \brief Destroy the internal memory
*
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment