Skip to content

Commit 1255d1c

Browse files
author
kevyuu
committed
Fix extent and remove duplicated extent specialization
1 parent 2fd2cba commit 1255d1c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

include/nbl/builtin/hlsl/type_traits.hlsl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,11 @@ struct extent<T[N], I> : integral_constant<uint64_t,extent<T, I - 1>::value> {};
732732
template<class T, uint32_t I>
733733
struct extent<T[], I> : integral_constant<uint64_t,extent<T, I - 1>::value> {};
734734

735-
template<class T, uint16_t N>
736-
struct extent<vector<T,N>, 0> : integral_constant<uint64_t, N> {};
735+
template<class T, uint16_t N, uint32_t I>
736+
struct extent<vector<T,N>, I> : extent<T[N], I> {};
737737

738738
template<class T, uint16_t M, uint16_t N, uint32_t I>
739-
struct extent<matrix<T,N,M>, I> : integral_constant<uint64_t,extent<T[N][M], I>::value> {};
739+
struct extent<matrix<T,N,M>, I> : extent<T[N][M], I> {};
740740

741741

742742
// Template Variables
@@ -855,12 +855,6 @@ struct float_of_size<8>
855855
template<uint16_t bytesize>
856856
using float_of_size_t = typename float_of_size<bytesize>::type;
857857

858-
template<typename T, int N, int M>
859-
struct extent<matrix<T, N, M>, 0> : integral_constant<uint64_t, N> {};
860-
861-
template<typename T, int N, int M>
862-
struct extent<matrix<T, N, M>, 1> : integral_constant<uint64_t, M> {};
863-
864858
}
865859
}
866860

0 commit comments

Comments
 (0)