Fetching contributors…
Cannot retrieve contributors at this time
34 lines (25 sloc) 765 Bytes
PREAMBLE = \
"""
#include <thrust/fill.h>
"""
INITIALIZE = \
"""
thrust::host_vector<$InputType> h_input($InputSize);
thrust::device_vector<$InputType> d_input($InputSize);
thrust::fill(h_input.begin(), h_input.end(), $InputType(13));
thrust::fill(d_input.begin(), d_input.end(), $InputType(13));
ASSERT_EQUAL(h_input, d_input);
"""
TIME = \
"""
thrust::fill(d_input.begin(), d_input.end(), $InputType(13));
"""
FINALIZE = \
"""
RECORD_TIME();
RECORD_THROUGHPUT(double($InputSize));
RECORD_BANDWIDTH(sizeof($InputType) * double($InputSize));
"""
InputTypes = SignedIntegerTypes
InputSizes = StandardSizes
TestVariables = [('InputType', InputTypes), ('InputSize', InputSizes)]