13.07.2015 Views

KernelGen - GPU Technology Conference

KernelGen - GPU Technology Conference

KernelGen - GPU Technology Conference

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Simple example: C.Compile the Fortran example as usual, just use kernelgen-gcc instead of gcc:$ kernelgen-gcc -O3 -std=c99 example_c.c -o example_c<strong>KernelGen</strong> always generates binaries usable both on CPU and <strong>GPU</strong>. To execute the regular version,run it as usual:$ ./example_c 512 256 256compute time = .1.848575maxval = 1.570796, minval = 1.570796In order to run <strong>GPU</strong>-accelerated version, simply set kernelgen_runmode environment variable to 1:$ kernelgen_runmode=1 ./example_c 512 256 256compute time = .0.293359maxval = 1.570796, minval = 1.5707966 / 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!