fork(1) download
  1. /**********************************************************************
  2. Copyright ©2014 Advanced Micro Devices, Inc. All rights reserved.
  3.  
  4. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  5.  
  6. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  7. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or
  8.  other materials provided with the distribution.
  9.  
  10. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  11.  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
  12.  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  13.  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  14.  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  15. ********************************************************************/
  16. __kernel void helloworld(__global char* in, __global char* out)
  17. {
  18. int num = get_global_id(0);
  19. out[num] = in[num] + 1;
  20. }
  21.  
  22. __kernel void SVMhelloworld(__global char* in, __global char* out)
  23. {
  24. int num = get_global_id(0);
  25. out[num] = in[num];
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:16:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __kernel void helloworld(__global char* in, __global char* out)
          ^
prog.c:22:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __kernel void SVMhelloworld(__global char* in, __global char* out)
          ^
stdout
Standard output is empty