On Thu, Nov 27, 2014 at 09:13:53AM +0800, spring_wind wrote:
> Hi:
> I am building beignet and some errors happend:
>
>
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:
> In member function ‘void gbe::ir::SamplerSet::getData(uint32_t*) const’:
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:51:
> 错误:expected initializer before ‘:’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected primary-expression before ‘}’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected ‘;’ before ‘}’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected primary-expression before ‘}’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected ‘)’ before ‘}’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected primary-expression before ‘}’ token
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:53:
> 错误:expected ‘;’ before ‘}’ token
> In file included from
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/unit.hpp:27,
> from
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/printf.hpp:29,
> from
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/function.hpp:32,
> from
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/context.hpp:28,
> from
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/ir/context.cpp:24:
>
>
>
> /home/peng_xihan/beignet_project/Beignet-1.0.0-Source/backend/src/./ir/sampler.hpp:51
>
> class SamplerSet : public Serializable
> {
> public:
> /*! Append the specified sampler and return the allocated offset.
> * If the speficied sampler is exist, only return the previous offset and
> * don't append it again. Return -1, if failed.*/
> uint8_t append(uint32_t clkSamplerValue, Context *ctx);
> /*! Append a sampler defined in kernel args. */
> uint8_t append(Register samplerArg, Context *ctx);
> size_t getDataSize(void) { return samplerMap.size(); }
> size_t getDataSize(void) const { return samplerMap.size(); }
> void getData(uint32_t *samplers) const {
> for(auto &it : samplerMap)
> samplers[it.second] = it.first;
> }
>
>
> OS is CentOS 6.5 64bit, gcc version is 4.4.7 20120313 (Red Hat 4.4.7-4), is
> it gcc version related?
Yes, it is. Please check the README.md:
"Please be noted that the code was compiled on GCC 4.6, GCC 4.7 and GCC 4.8 and
CLANG 3.5 and
ICC 14.0.3. Since the code uses really recent C++11 features, you may expect
problems with
older compilers."
You need to update gcc version.
Thanks,
Zhigang Gong.
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet