Closed ichinii closed 1 month ago
What does the compiler resolve Idx
to ?
TExtent=uint32_t
Strange issue... In the idx/Traits.hpp file; the Idx
template alias is defined before the specialisation. Namely; template<typename T> using Idx = typename trait::IdxType<T>::type;
is defined before the trait::IdxType
sepecialization for is_arithmetic
case. Could taking the template alias after the specialisation might help?
Could taking the template alias after the specialisation might help?
No this should not help, the type is forward declared, so all is fine. If a non arithmetic type is used it will fail with an error that there is no definition or incomplete type error.
@ichinii Could you please add the nvcc and visual studio version you used where the issue showed up.
Ohh wait @ichinii could you please try if including #include "alpaka/idx/Traits.hpp"
in BufUniformCudaHipRt.hpp
and ViewSubView.hpp
instead of adding alpaka::
is solving the issue too?
I think the problem is that unser linux we pull the Idx
trait transitive and for reasons this is not the case in windows.
Thanks for your quick responses. I got back to my windows machine today. Let me try to answer your questions.
What does the compiler resolve
Idx
to ?
Just declaring a variable with type Idx<TExtent>
raises an error. It looks like it resolves to alpaka::internal::ViewAccessOps<TView>::Idx
.
Kind of strange that it resolves to ViewAccessOps<TView>::Idx
even though we are talking BufUniformCudaHipRt
here.
[build] C:\Users\ich\Desktop\hzb\forkalpaka\include\alpaka/mem/buf/BufUniformCudaHipRt.hpp(77): error : type "alpaka::internal::ViewAccessOps<TView>::Idx [with TView=alpaka::BufUniformCudaHipRt<alpaka::ApiCudaRt, int32_t, std::integral_constant<size_t, 1ULL>, uint64_t>]" (declared at line 45 of C:\Users\ich\Desktop\hzb\forkalpaka\include\alpaka/mem/view/ViewAccessOps.hpp) is inaccessible [C:\Users\ich\Desktop\hzb\forkalpaka\build\gpu-cuda-nvcc\test\unit\mem\copy\bufSlicingTest.vcxproj]
[build] Idx<TExtent> test;
@ichinii Could you please add the nvcc and visual studio version you used where the issue showed up.
msvc: Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33523 für x64
installed with Visual Studio 2022
VSCode: 1.89.0
Ohh wait @ichinii could you please try if including
#include "alpaka/idx/Traits.hpp"
inBufUniformCudaHipRt.hpp
andViewSubView.hpp
instead of addingalpaka::
is solving the issue too? I think the problem is that unser linux we pull theIdx
trait transitive and for reasons this is not the case in windows.
I added the include to BufUniformCudaHipRt.hpp
. It is already present in ViewSubView.hpp
. Afai can tell it results in the same behaviour.
thanks for fixing the issue!
on windows, the use of Idx resolves differently than alpaka::Idx, thus alpaka::Idx should be used directly.
Compile log:
edit: msvc:
Microsoft (R) C/C++-Optimierungscompiler Version 19.39.33523 für x64
installed withVisual Studio 2022
VSCode:1.89.0