// Create a data-parallel array and fill it with data
var data = new DataParallelArray<float>(computationProvider,
new[] { 0f, 1f, 2f, 3f, 4f, 5f, 6f });
// Compile the query
CompiledQuery query = computationProvider.Compile<DataParallelArray<float>>
(
d => from value in d
select value * 2f
);
// Run the query on this data
IQueryable result = computationProvider.Run(query, data);
// Print out the results
foreach (float value in result)
Console.WriteLine(value);
// Get rid of all the stuff we created
computationProvider.Dispose();
data.Dispose(); </pre></div>