vector_scal_opencl_codelet.texi 787 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright 1993-2009 NVIDIA Corporation. All rights reserved.
  3. *
  4. * NVIDIA Corporation and its licensors retain all intellectual property and
  5. * proprietary rights in and to this software and related documentation.
  6. * Any use, reproduction, disclosure, or distribution of this software
  7. * and related documentation without an express license agreement from
  8. * NVIDIA Corporation is strictly prohibited.
  9. *
  10. * Please refer to the applicable NVIDIA end user license agreement (EULA)
  11. * associated with this source code for terms and conditions that govern
  12. * your use of this NVIDIA software.
  13. *
  14. */
  15. __kernel void vectorScal(__global float* val, int nx, float factor)
  16. @{
  17. const int i = get_global_id(0);
  18. if (i < nx) @{
  19. val[i] *= factor;
  20. @}
  21. @}