Last active
May 31, 2016 15:47
-
-
Save OXPHOS/89ad25db040852b5ea1add46d122a795 to your computer and use it in GitHub Desktop.
unique_ptr error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2457:27: error: | |
implicit instantiation of undefined member 'GPU_Vector<int>::GPUArray' | |
static_assert(sizeof(_Tp) > 0, "default_delete can not delete incomplete type"); | |
^ | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2658:13: note: | |
in instantiation of member function 'std::__1::default_delete<GPU_Vector<int>::GPUArray>::operator()' requested | |
here | |
__ptr_.second()(__tmp); | |
^ | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2626:46: note: | |
in instantiation of member function 'std::__1::unique_ptr<GPU_Vector<int>::GPUArray, | |
std::__1::default_delete<GPU_Vector<int>::GPUArray> >::reset' requested here | |
_LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();} | |
^ | |
/Users/zora/Github/shogun/src/shogun/mathematics/linalg/linalgRefactor.h:60:27: note: in instantiation of member function | |
'std::__1::unique_ptr<GPU_Vector<int>::GPUArray, std::__1::default_delete<GPU_Vector<int>::GPUArray> | |
>::~unique_ptr' requested here | |
template <class T> struct GPU_Vector : public BaseVector<T> | |
^ | |
/Users/zora/Github/shogun/src/shogun/mathematics/linalg/linalgRefactor.h:63:12: note: member is declared here | |
struct GPUArray; | |
^ | |
1 error generated. | |
make[2]: *** [tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/linalg/LinalgRefactor_unittest.cc.o] Error 1 | |
make[1]: *** [tests/unit/CMakeFiles/shogun-unit-test.dir/all] Error 2 | |
make: *** [all] Error 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class T> struct GPU_Vector<T>::GPUArray | |
{ | |
GPUArray(){} | |
}; | |
template <class T> GPU_Vector<T>::GPU_Vector(const SGVector<T> &vector) | |
:gpuarray(std::unique_ptr<GPUArray>(new GPU_Vector<T>::GPUArray())) { } | |
template struct GPU_Vector<int32_t>; | |
template struct GPU_Vector<float64_t>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class T> struct GPU_Vector : public BaseVector<T> | |
{ | |
private: | |
struct GPUArray; | |
std::unique_ptr<GPUArray> gpuarray; | |
.. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment