News for hackers. Stuff that matters.
Re:Metal – Apple’s new graphics API by foxhill on Tuesday June 03, 2014 @08:26AM (#7839662)
at the kernel level, fortran isn't really that different to C. it has a power operator. there is no for loop. you certainly will not be reading from files inside a kernel, so.. why do you want to use fortran? i can't tell you whom, but one of the big OpenCL vendors is actually working on fortran OpenCL kernels, as a direct result of SPIR.

if you want C++ in your kernels.. well, you're going to have a bad time if you want performance.

Re:Metal – Apple’s new graphics API by MaxBarraclough on Tuesday June 03, 2014 @01:15PM (#7841465)
> why do you want to use fortran?

Performance, and legacy code?

> if you want C++ in your kernels.. well, you're going to have a bad time if you want performance.

Not necessarily, no. Only if you abuse it.

Re:Metal – Apple’s new graphics API by foxhill on Tuesday June 03, 2014 @02:31PM (#7841946)
> Performance

largely myth

> legacy code

using OpenCL is not like OpenMP, you don't just add a few pragmas and you're set. C code needs to be rewritten for OpenCL. this is largely copy and paste, due to the syntax being so similar, assuming you have mathsy things in your kernels, but the same is true for fortran. replace array access brackets with square brackets, replace power operators with the built-in power functions, etc.

porting legacy (usually fortran) codes to OpenCL/CUDA is actually what i do for a living.