

- ERROR C2100 ILLEGAL INDIRECTION GENERATOR
- ERROR C2100 ILLEGAL INDIRECTION PORTABLE
- ERROR C2100 ILLEGAL INDIRECTION FREE
ERROR C2100 ILLEGAL INDIRECTION PORTABLE
One of them, which you correctly point out, is to allow developers to ship their OpenCL programs in a portable binary format (LLVM bitcode), instead of shipping their OpenCL C source code with their applications (and yes, "OpenCL C" is the term for the C99-based language defined by the OpenCL standard for writing device programs).Īnother goal, which in my opinion is far more interesting, is having the ability to target SPIR from languages *other* than OpenCL C. SPIR is an LLVM-based intermediate representation which has a number of goals.

My advice to you is to ignore SPIR and just use OpenCL directly. (OpenMP 4.0 is another way.) As I noted, you can use OpenCL from Fortran. If your desire is to harness the computational resources of graphics processors in a manufacturer-independent fashion, OpenCL is one way to do that. Maybe I'm missing something, but SPIR seems to make OpenCL more complicated than it needs to be. It looks to me as if SPIR is providing the ability to "precompile" OpenCL code so that you don't have to expose it to whoever uses your application (often OpenCL kernels are read from source files, though there's no requirement to do so.)

Typically one writes the computational kernel in the OpenCL language and use calls from the "native" language (C, Fortran, etc.) to "compile" the kernel and then send the kernel and the data to the coprocessor, which executes it and sends the data back. OpenCL is executed natively by graphics processors and coprocessors - it is supported by Intel HD Graphics in recent Intel processors and by Intel Xeon Phi, as well as in graphics processors and accelerators from NVidia and AMD. I have never heard the term "OpenCL C" before, but I admit I am not an expert on OpenCL. I had not heard of SPIR before - this appears to be some sort of intermediary between the programmer and OpenCL - I am somewhat baffled as to what problem it is trying to solve.
ERROR C2100 ILLEGAL INDIRECTION FREE
It's quite possible that I'm missing the big picture here so please feel free to correct whatever I'm not catching. That sounds challenging but not totally infeasible knowing that OpenACC to SPIR is on its way.
ERROR C2100 ILLEGAL INDIRECTION GENERATOR
However, the language semantics must be mappable to SPIR and satisfy the constraints of OpenCL target systems.Īs I understand it that would require replacing, in the SPIR Reference Flow, the OpenCL C to SPIR IR generator by an OpenCL Fortran (?) to SPIR one.

The alternative language could be many things, such as an established language (like FORTRAN), an exotic domain specific language, or a single source programming environment with automatic code partitioning. There is no need to generate OpenCL C as an intermediate. What set of problems is SPIR supposed to solve?Įnable third-party code generation targeting OpenCL platforms without going through OpenCL C:įor example, a compiler for an alternative device language (not OpenCL C) can generate SPIR and have it run on any OpenCL backend that supports the cl_khr_spir extension. It doesn't point to my code so I dont exactly know whats wrong.I was actually thinking about kernels in Fortran, excerpt from the SPIR FAQ: 我得到的错误是: Error 24 error C2440: 'initializing' : cannot convert from 'std::_List_const_iterator' to 'AttrValue' c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory 208Įrror 25 error C2100: illegal indirection c:\program files (x86)\microsoft visual studio 10.0\vc\include\xrefwrap 49Įrror 26 error C2296: '.*' : illegal, left operand has type 'AttrValue' c:\program files (x86)\microsoft visual studio 10.0\vc\include\xrefwrap 49Įrror 37 error C2440: 'initializing' : cannot convert from 'std::_List_const_iterator' to 'AttrValue' c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory 208Įrror 38 error C2100: illegal indirection c:\program files (x86)\microsoft visual studio 10.0\vc\include\xrefwrap 49Įrror 39 error C2296: '.*' : illegal, left operand has type 'AttrValue' c:\program files (x86)\microsoft visual studio 10.0\vc\include\xrefwrap 49
