vector_scal_opencl_codelet.texi 466 B

1234567891011121314151617
  1. @c -*-texinfo-*-
  2. @c This file is part of the StarPU Handbook.
  3. @c Copyright (C) 2009-2011 Université de Bordeaux 1
  4. @c Copyright (C) 2010, 2011 Centre National de la Recherche Scientifique
  5. @c See the file starpu.texi for copying conditions.
  6. @smallexample
  7. __kernel void vector_mult_opencl(__global float* val, int nx, float factor)
  8. @{
  9. const int i = get_global_id(0);
  10. if (i < nx) @{
  11. val[i] *= factor;
  12. @}
  13. @}
  14. @end smallexample