Skip to content

Commit

Permalink
ranges: Fix compilation 64-bit index type
Browse files Browse the repository at this point in the history
  • Loading branch information
stotko committed May 10, 2020
1 parent a7a8350 commit 93ef044
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stdgpu/impl/ranges_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ device_range<T>::device_range(T* p,
}


#if STDGPU_USE_32_BIT_INDEX
template <typename T>
STDGPU_HOST_DEVICE
device_range<T>::device_range(T* p,
Expand All @@ -52,6 +53,7 @@ device_range<T>::device_range(T* p,
{

}
#endif


template <typename T>
Expand Down Expand Up @@ -143,6 +145,7 @@ host_range<T>::host_range(T* p,
}


#if STDGPU_USE_32_BIT_INDEX
template <typename T>
STDGPU_HOST_DEVICE
host_range<T>::host_range(T* p,
Expand All @@ -152,6 +155,7 @@ host_range<T>::host_range(T* p,
{

}
#endif


template <typename T>
Expand Down
7 changes: 7 additions & 0 deletions src/stdgpu/ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <stdgpu/iterator.h>
#include <stdgpu/platform.h>

// For compatibility only. Remove this along with deprecated constructors
#include <stdgpu/config.h>



namespace stdgpu
Expand Down Expand Up @@ -65,6 +68,7 @@ class device_range
device_range(T* p,
index64_t n);

#if STDGPU_USE_32_BIT_INDEX
/**
* \deprecated Replaced by device_range(T*, index64_t)
* \brief Constructor
Expand All @@ -75,6 +79,7 @@ class device_range
STDGPU_HOST_DEVICE
device_range(T* p,
index_t n);
#endif

/**
* \brief Constructor
Expand Down Expand Up @@ -179,6 +184,7 @@ class host_range
host_range(T* p,
index64_t n);

#if STDGPU_USE_32_BIT_INDEX
/**
* \deprecated Replaced by host_range(T*, index64_t)
* \brief Constructor
Expand All @@ -189,6 +195,7 @@ class host_range
STDGPU_HOST_DEVICE
host_range(T* p,
index_t n);
#endif

/**
* \brief Constructor
Expand Down

0 comments on commit 93ef044

Please sign in to comment.