Skip to content

Commit 2dc2bfb

Browse files
author
devsh
committed
update examples_tests submodule and mark final questions
1 parent 27919be commit 2dc2bfb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples_tests

include/nbl/builtin/hlsl/memory_accessor.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ struct pair
3535

3636

3737
// TODO: find some cool way to SFINAE the default into `_NBL_HLSL_WORKGROUP_SIZE_` if defined, and something like 1 otherwise
38-
template<class BaseAccessor, typename AccessType=uint32_t, typename IndexType=uint32_t, typename Strides=pair<integral_constant<IndexType,1>,integral_constant<IndexType,_NBL_HLSL_WORKGROUP_SIZE_> > >
38+
template<class BaseAccessor, typename AccessType, typename IndexType=uint32_t, typename Strides=pair<integral_constant<IndexType,1>,integral_constant<IndexType,_NBL_HLSL_WORKGROUP_SIZE_> > >
3939
struct MemoryAdaptor // TODO: rename to something nicer like StructureOfArrays and add a `namespace accessor_adaptors`
4040
{
41+
// Question: should the `BaseAccessor` let us know what this is?
4142
using access_t = AccessType;
4243
using index_t = IndexType;
4344
NBL_CONSTEXPR index_t ElementStride = Strides::first_type::value;
@@ -52,6 +53,7 @@ struct MemoryAdaptor // TODO: rename to something nicer like StructureOfArrays a
5253
return retVal;
5354
}
5455

56+
// Question: shall we go back to requiring a `access_t get(index_t)` on the `BaseAccessor`, then we could `enable_if` check the return type (via `has_method_get`) matches and we won't get Nasty HLSL copy-in copy-out conversions
5557
template<typename T>
5658
enable_if_t<sizeof(T)%sizeof(access_t)==0,void> get(const index_t ix, NBL_REF_ARG(T) value)
5759
{

0 commit comments

Comments
 (0)