Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

gfx offload compile error

$
0
0

Hello,

I am running VS2013 and haven't had any luck getting a simple gfx offload to compile.

the error I am getting is as follows:

gfx_linker: : error : failed to execute 'ld.exe', errno 2

I have been unable to determine what is causing this error.  Any ideas would be helpful.  I have included my code below.

 

#include "stdafx.h"
#include <cilk\cilk.h>
#include <cilk\common.h>

int main(void)
{
    float *indata, *outdata;
    int nrows = 512;
    int ncols = 512;

    int size = nrows*ncols;

    indata  = (float *)malloc(size*sizeof(float));
    outdata = (float *)malloc(size*sizeof(float));

#pragma offload target(gfx) pin(indata,outdata:length(size))
    {
        _Cilk_for(int i = 0; i < size; i++)
        {
            outdata[i] = 4 * indata[i];
        }
    }

    free(indata);
    free(outdata);    

}

Regards,

Brad

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>