<para>You need to include the header file, <computeroutput>taskflow/cuda/algorithm/transform.hpp</computeroutput>, for using the parallel-transform algorithm.</para>
<para>Parallel-transform algorithm applies the given transform function to a range of items and store the result in another range specified by two iterators, <computeroutput>first</computeroutput> and <computeroutput>last</computeroutput>. The task created by <refrefid="namespacetf_1a3ed764530620a419e3400e1f9ab6c956"kindref="member">tf::cuda_transform(P&& p, I first, I last, O output, C op)</ref> represents a parallel execution for the following loop:</para>
<para>The following example creates a transform kernel that transforms an input range of <computeroutput>N</computeroutput> items to an output range by multiplying each item by 10.</para>
<para>Each iteration is independent of each other and is assigned one kernel thread to run the callable. The transform algorithm runs <emphasis>asynchronously</emphasis> through the stream specified in the execution policy. You need to synchronize the stream to obtain correct results.</para>
<para>You can transform two ranges of items to an output range through a binary operator. The task created by <refrefid="namespacetf_1abdcb5b755f7ace2aa452541d5bf93b5f"kindref="member">tf::cuda_transform(P&& p, I1 first1, I1 last1, I2 first2, O output, C op)</ref> represents a parallel execution for the following loop:</para>
<para>The following example creates a transform kernel that transforms two input ranges of <computeroutput>N</computeroutput> items to an output range by summing each pair of items in the input ranges.</para>