Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Add __forceinline__ to thrust::detail::wrapped_function::operator() #1647

Merged
merged 1 commit into from
May 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions thrust/detail/function.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ struct wrapped_function

__thrust_exec_check_disable__
template <typename Argument>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(Argument& x) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x)));
}

__thrust_exec_check_disable__
template <typename Argument>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(const Argument& x) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x)));
}

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(Argument1& x, Argument2& y) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
Expand All @@ -67,7 +67,7 @@ struct wrapped_function

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(const Argument1& x, Argument2& y) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
Expand All @@ -76,7 +76,7 @@ struct wrapped_function

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(const Argument1& x, const Argument2& y) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
Expand All @@ -85,7 +85,7 @@ struct wrapped_function

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
Result operator()(Argument1& x, const Argument2& y) const
{
return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
Expand All @@ -111,45 +111,45 @@ struct wrapped_function<Function, void>

__thrust_exec_check_disable__
template <typename Argument>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(Argument& x) const
{
m_f(thrust::raw_reference_cast(x));
}

__thrust_exec_check_disable__
template <typename Argument>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(const Argument& x) const
{
m_f(thrust::raw_reference_cast(x));
}

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(Argument1& x, Argument2& y) const
{
m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
}

__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(const Argument1& x, Argument2& y) const
{
m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
}
__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(const Argument1& x, const Argument2& y) const
{
m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
}
__thrust_exec_check_disable__
template <typename Argument1, typename Argument2>
inline __host__ __device__
__thrust_forceinline__ __host__ __device__
void operator()(Argument1& x, const Argument2& y) const
{
m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
Expand Down