@@ -123,12 +123,12 @@ class Adapter {
123
123
// /
124
124
// / \sa adapter::checkUrResult
125
125
template <UrApiKind UrApiOffset, typename ... ArgsT>
126
- ur_result_t call_nocheck (ArgsT... Args) const {
126
+ ur_result_t call_nocheck (ArgsT && ...Args) const {
127
127
ur_result_t R = UR_RESULT_SUCCESS;
128
128
if (!adapterReleased) {
129
129
detail::UrFuncInfo<UrApiOffset> UrApiInfo;
130
130
auto F = UrApiInfo.getFuncPtr (&UrFuncPtrs);
131
- R = F (Args...);
131
+ R = F (std::forward<ArgsT>( Args) ...);
132
132
}
133
133
return R;
134
134
}
@@ -137,15 +137,15 @@ class Adapter {
137
137
// /
138
138
// / \throw sycl::runtime_exception if the call was not successful.
139
139
template <UrApiKind UrApiOffset, typename ... ArgsT>
140
- void call (ArgsT... Args) const {
141
- auto Err = call_nocheck<UrApiOffset>(Args...);
140
+ void call (ArgsT && ...Args) const {
141
+ auto Err = call_nocheck<UrApiOffset>(std::forward<ArgsT>( Args) ...);
142
142
checkUrResult (Err);
143
143
}
144
144
145
145
// / \throw sycl::exceptions(errc) if the call was not successful.
146
146
template <sycl::errc errc, UrApiKind UrApiOffset, typename ... ArgsT>
147
- void call (ArgsT... Args) const {
148
- auto Err = call_nocheck<UrApiOffset>(Args...);
147
+ void call (ArgsT && ...Args) const {
148
+ auto Err = call_nocheck<UrApiOffset>(std::forward<ArgsT>( Args) ...);
149
149
checkUrResult<errc>(Err);
150
150
}
151
151
0 commit comments