vt::TensorCondProxy#
-
template<typename T>
struct AssignValue# AssignValue struct to assign a value to the tensor based on the condition tensor.
- Template Parameters:
T – Data type of the tensor.
Public Functions
-
inline AssignValue(T value)#
Construct a new AssignValue object.
- Parameters:
value – The value to be assigned.
- inline __device__ T operator() (const T &x) const
Operator to assign a value to the tensor based on the condition.
- Parameters:
x – The value.
- Returns:
T: The value to be assigned.
-
template<typename T, size_t N>
class TensorCondProxy : public vt::Tensor<T, N># TensorCondProxy to perform a copy assignment operator based on the condition.
- Template Parameters:
T – Data type of the tensor.
N – Number of dimensions of the tensor.
Public Functions
-
inline TensorCondProxy(const Tensor<T, N> &tensor, const Tensor<bool, N> &cond)#
Construct a TensorCondProxy object.
- Parameters:
tensor – The tensor.
cond – The condition tensor.
-
inline TensorCondProxy &operator=(const T value)#
Copy assignment operator for the TensorCondProxy from a constant.
- Parameters:
value – The value to be assigned.
- Returns:
TensorCondProxy: The tensor condition proxy object.