Commit 08c761a0 authored by incardon's avatar incardon

Fixing upgrade target

parent e94992a0
......@@ -49,6 +49,34 @@ function update_openfpm()
git pull origin master
else
#### New version require new version of CMAKE
dgc_major=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
cmake_result=0
if [ $dgc_major -gt 3 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
elif [ $dgc_major -lt 3 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your cmake $dgc_major.$dgc_middle;$dgc_minor is too old, 3.8.X or higher is required"
elif [ $dgc_middle -gt 8 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
elif [ $dgc_middle -lt 8 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your cmake $dgc_major.$dgc_middle;$dgc_minor is too old, 3.8.X or higher is required"
else
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
fi
if [ $cmake_result -ne 0 ]; then
echo -e "Upgrade summary\033[91;5;1m FAILED \033[0m"
return
else
rm -rf {,.[!.],..?}*
echo "Cloning Repo: $repo"
git clone $repo .
......
......@@ -1137,8 +1137,7 @@ public:
#ifdef CUDA_GPU
/*! \brief Construct a cell list starting from the stored particles, this version of cell-list can be offloaded with
* the function toGPU
/*! \brief Construct a cell list starting from the stored particles
*
* \param r_cut interation radius, or size of each cell
*
......@@ -1162,6 +1161,7 @@ public:
return getCellListGPU(r_cut, g,no_se3);
}
/*! \brief Construct a cell list starting from the stored particles
*
* It differ from the get getCellList for an additional parameter, in case the
......@@ -1209,6 +1209,41 @@ public:
#endif
///////////////////////// Device Interface, this interface always exist it wrap the GPU if you have one or the CPU if you do not have ////////////////
#ifdef CUDA_GPU
/*! \brief Construct a cell list from the stored particles
*
* \param r_cut interation radius, or size of each cell
*
* \return the Cell list
*
*/
auto getCellListDevice(St r_cut, bool no_se3 = false) -> decltype(getCellListGPU(r_cut,no_se3))
{
return getCellListGPU(r_cut,no_se3);
}
#else
/*! \brief Construct a cell list from the stored particles
*
* \param r_cut interation radius, or size of each cell
*
* \return the Cell list
*
*/
auto getCellListDevice(St r_cut, bool no_se3 = false) -> decltype(getCellList(r_cut, g,no_se3))
{
return getCellList(r_cut, g,no_se3);
}
#endif
////////////////////// End Device Interface ////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*! \brief Construct an hilbert cell list starting from the stored particles
*
* \tparam CellL CellList type to construct
......@@ -1997,6 +2032,34 @@ public:
#endif
}
#endif
#ifdef CUDA_GPU
/*! \brief Get an iterator that traverse the particles in the domain
*
* \return an iterator
*
*/
auto getDomainIteratorDevice(size_t n_thr = 1024) const -> decltype(getDomainIteratorGPU(n_thr))
{
return getDomainIteratorGPU(n_thr);
}
#else
/*! \brief Get an iterator that traverse the particles in the domain
*
* \return an iterator
*
*/
auto getDomainIteratorDevice(size_t n_thr = 1024) const -> decltype(getDomainIterator())
{
return getDomainIterator();
}
#endif
/*! \brief Get an iterator that traverse the particles in the domain
......@@ -2730,5 +2793,6 @@ public:
template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St,CudaMemory,memory_traits_inte>> using vector_dist_gpu = vector_dist<dim,St,prop,Decomposition,CudaMemory,memory_traits_inte>;
template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St,HeapMemory,memory_traits_inte>> using vector_dist_soa = vector_dist<dim,St,prop,Decomposition,HeapMemory,memory_traits_inte>;
template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St,CudaMemory,memory_traits_inte>> using vector_dist_dev = vector_dist<dim,St,prop,Decomposition,CudaMemory,memory_traits_inte>;
#endif /* VECTOR_HPP_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment