@@ -41,12 +41,14 @@ struct PreloadedAccessorCommonBase
4141
4242struct PreloadedAccessorBase : PreloadedAccessorCommonBase
4343{
44- void set (uint32_t idx, complex_t<scalar_t> value)
44+ template <typename IndexType, typename AccessType>
45+ void set (IndexType idx, AccessType value)
4546{
4647preloaded[idx >> WorkgroupSizeLog2] = value;
4748}
4849
49- void get (uint32_t idx, NBL_REF_ARG (complex_t<scalar_t>) value)
50+ template <typename IndexType, typename AccessType>
51+ void get (IndexType idx, NBL_REF_ARG (AccessType) value)
5052{
5153value = preloaded[idx >> WorkgroupSizeLog2];
5254}
@@ -57,12 +59,14 @@ struct PreloadedAccessorBase : PreloadedAccessorCommonBase
5759// In the case for preloading all channels at once we make it stateful so we track which channel we're running FFT on
5860struct MultiChannelPreloadedAccessorBase : PreloadedAccessorCommonBase
5961{
60- void set (uint32_t idx, complex_t<scalar_t> value)
62+ template <typename IndexType, typename AccessType>
63+ void set (IndexType idx, AccessType value)
6164{
6265preloaded[currentChannel][idx >> WorkgroupSizeLog2] = value;
6366}
6467
65- void get (uint32_t idx, NBL_REF_ARG (complex_t<scalar_t>) value)
68+ template <typename IndexType, typename AccessType>
69+ void get (IndexType idx, NBL_REF_ARG (AccessType) value)
6670{
6771value = preloaded[currentChannel][idx >> WorkgroupSizeLog2];
6872}
0 commit comments