stdgpu/algorithm.h Source File#
stdgpu Latest
Efficient STL-like Data Structures on the GPU
|
algorithm.h
Go to the documentation of this file.
STDGPU_HOST_DEVICE const T & clamp(const T &v, const T &lower, const T &upper)
Clamps a value to the given range.
constexpr STDGPU_HOST_DEVICE const T & min(const T &a, const T &b)
Computes the minimum of the given values.
Iterator fill_n(ExecutionPolicy &&policy, Iterator begin, Size n, const T &value)
Writes the given value into the given range using the copy assignment operator.
OutputIt copy_n(ExecutionPolicy &&policy, InputIt begin, Size n, OutputIt output_begin)
Copies all elements of the input range to the output range using the copy assignment operator.
void for_each_index(ExecutionPolicy &&policy, IndexType size, UnaryFunction f)
Calls the given unary function with an index from the range [0, size)
void fill(ExecutionPolicy &&policy, Iterator begin, Iterator end, const T &value)
Writes the given value into the given range using the copy assignment operator.
constexpr STDGPU_HOST_DEVICE const T & max(const T &a, const T &b)
Computes the maximum of the given values.
OutputIt copy(ExecutionPolicy &&policy, InputIt begin, InputIt end, OutputIt output_begin)
Copies all elements of the input range to the output range using the copy assignment operator.
index64_t size(T *array)
Finds the size (number of elements) of the given dynamically allocated array.
#define STDGPU_HOST_DEVICE
Platform-independent host device function annotation.
Definition: platform.h:77
Generated by 1.9.6