[Beignet] [PATCH] Fix build with clang++
Armin K
krejzi at email.com
Mon Feb 22 00:12:43 UTC 2016
Dynamic length arrays don't seem to be supported.
Also, default floating point type is double in C++,
no need for "d" suffix, which isn't supported by
clang++
---
backend/src/backend/gen8_context.cpp | 4 ++--
backend/src/llvm/llvm_gen_backend.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/backend/gen8_context.cpp b/backend/src/backend/gen8_context.cpp
index 7455bfc..d85e968 100644
--- a/backend/src/backend/gen8_context.cpp
+++ b/backend/src/backend/gen8_context.cpp
@@ -1074,8 +1074,8 @@ namespace gbe
p->curr.execWidth = 4;
p->curr.predicate = GEN_PREDICATE_NONE;
p->curr.noMask= 1;
- p->MOV(r1, GenRegister::immdf(1.0d));
- p->MOV(r0, GenRegister::immdf(0.0d));
+ p->MOV(r1, GenRegister::immdf(1.0));
+ p->MOV(r0, GenRegister::immdf(0.0));
} p->pop();
for (int i = 0; i < loopNum; i++) {
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 1a2bbcd..bbbd537 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -3842,7 +3842,7 @@ namespace gbe
ctx.WORKGROUP(opcode, (uint32_t)0, getRegister(&I), srcTuple, 1, ir::TYPE_S32);
} else if (opcode == ir::WORKGROUP_OP_BROADCAST) {
int argNum = CS.arg_size();
- ir::Register src[argNum];
+ std::vector<ir::Register> src(argNum);
for (int i = 0; i < argNum; i++) {
src[i] = this->getRegister(*(AI++));
}
--
2.7.1
More information about the Beignet
mailing list