-
Notifications
You must be signed in to change notification settings - Fork 187
Memory Resource / View #158
Changes from 1 commit
e98dad5
47ae762
f9d0e0c
e3b7932
3ccc32b
3f65584
5d865e5
04e37c3
80e554f
87c3c86
645cea3
d2b8077
b6f1f6d
bd1a00d
a96f150
97e84fa
ee48752
b7631f1
d77f640
35d0849
da2c650
e494129
f8cee68
b5f6627
7a07c90
5ba94ed
4ca291c
6b265e2
6378948
fdd0a13
47960cd
ee116b9
2aed9eb
23a1d84
906a4e9
6bde07f
520dc78
659ff54
57036ea
381ef33
3103f9d
80f9907
493c911
e83b73e
a3806af
42939f1
1bb6017
74758d8
d26e8b7
f16fd51
ccbbc23
36ea9a8
fdf8b37
0e94d50
b6d5c36
682a68e
de953ea
e4ba29c
1cff649
ac8aa21
cc3cad3
5318bbf
da320e8
6ba42e8
e0c4195
09e7bb6
9664913
a04f690
e929d27
4328b67
eb93da5
47c5b8d
084bd1a
68becc7
39c07a2
3e4e1d2
4d022ab
6364727
c33e67d
8038d08
3255270
04d809b
5071663
92c261c
38af784
4449c30
f2d1249
6e45682
01b2e7e
51519c8
142b830
a8ffe8f
adc7f8d
1c2c1f3
973b1bb
2798a5c
e813908
1d3be3f
1dab7fa
fbd1b6e
5d5caac
8675c03
4e41555
7d902cf
be60e50
c0f313c
373dc57
fc38d9a
f87f7f6
e277a85
9ac28c9
9fea2e4
bb2719f
652af93
31d66ac
5629299
a18cb23
158feee
fcc283d
8712779
98a8858
348fabb
8c14994
a735037
c9b53da
3c71f2a
6e1882f
d83934f
ebc7ddc
260caba
419f29b
d92fdc1
e13c6ba
3b8b97a
00a5fe4
ac90a7f
3f40bcc
9a8d144
d3a4006
a07b740
0419a42
16103ce
025d184
720ae7e
91b7abc
698a502
696be93
fda1658
c8dbdf8
b43ce65
af7bd53
377a1e6
2285a65
64728e0
45aeec4
484c23d
03ee4f8
67624c5
0a6b39e
545d87b
199d584
64f087f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -112,6 +112,44 @@ bool __is_type(const ::std::type_info *__ti1, const void *__fallback_ti1) { | |||||||||||||||||||||||
template <typename _ResourcePointer, typename... _Properties> | ||||||||||||||||||||||||
class basic_resource_view; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
template <typename... _Properties> | ||||||||||||||||||||||||
struct properties; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
namespace detail { | ||||||||||||||||||||||||
template <typename... _Properties> | ||||||||||||||||||||||||
struct __kind_from_properties_helper { | ||||||||||||||||||||||||
using type = void; | ||||||||||||||||||||||||
}; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
template <typename... _Properties> | ||||||||||||||||||||||||
using __kind_from_properties_helper_t = typename __kind_from_properties_helper<_Properties...>::type; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
template <typename _Kind, typename... _Tail> | ||||||||||||||||||||||||
struct __kind_from_properties_helper<is_kind<_Kind>, _Tail...> { | ||||||||||||||||||||||||
using type = _Kind; | ||||||||||||||||||||||||
}; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
template <typename _FirstProp, typename... _Tail> | ||||||||||||||||||||||||
struct __kind_from_properties_helper<_FirstProp, _Tail...> { | ||||||||||||||||||||||||
using type = __kind_from_properties_helper_t<_Tail...>; | ||||||||||||||||||||||||
}; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
/*! | ||||||||||||||||||||||||
* \brief Evaluaes to the a memory kind tag form _Properties (if listed as is_kind) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
* or to a list of properties otherwise. | ||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||
template <typename... _Properties> | ||||||||||||||||||||||||
struct kind_from_properties { | ||||||||||||||||||||||||
using type = _CUDA_VSTD::conditional_t< | ||||||||||||||||||||||||
_CUDA_VSTD::is_same<detail::__kind_from_properties_helper_t<_Properties...>, void>, | ||||||||||||||||||||||||
detail::__kind_from_properties_helper_t<_Properties...> | ||||||||||||||||||||||||
>; | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure how this is supposed to compile.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It compiles if I write it as above, but I'm not sure if it's correct. |
||||||||||||||||||||||||
}; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
/*! | ||||||||||||||||||||||||
* \brief Groups the tag types denoting the execution environment in which the memory can be accessed | ||||||||||||||||||||||||
* | ||||||||||||||||||||||||
|
@@ -815,8 +853,6 @@ public: | |||||||||||||||||||||||
|
||||||||||||||||||||||||
template <typename _Ptr2, typename... _Props2> | ||||||||||||||||||||||||
bool operator==(const cuda::basic_resource_view<_Ptr2, _Props2...> &__v2) const noexcept { | ||||||||||||||||||||||||
using __view1_t = basic_resource_view; | ||||||||||||||||||||||||
using __view2_t = basic_resource_view<_Ptr2, _Props2...>; | ||||||||||||||||||||||||
if (__pointer == nullptr || __v2.__pointer == nullptr) | ||||||||||||||||||||||||
return __pointer == nullptr && __v2.__pointer == nullptr; | ||||||||||||||||||||||||
return static_cast<const detail::memory_resource_base*>(__pointer)->is_equal(*__v2.__pointer); | ||||||||||||||||||||||||
harrism marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does not compile for me anymore after this latest change --
is_kind
is not defined until later in the file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix for this appears to be to move the
struct is_kind
definition above this.