[Beignet] [PATCH] GBE: handle half type size

Xing, Homer homer.xing at intel.com
Mon Nov 11 22:38:08 PST 2013


This patch looks good to me.

-----Original Message-----
From: beignet-bounces at lists.freedesktop.org [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Ruiling Song
Sent: Tuesday, November 12, 2013 9:10 AM
To: beignet at lists.freedesktop.org
Cc: Song, Ruiling
Subject: [Beignet] [PATCH] GBE: handle half type size

Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 backend/src/llvm/llvm_passes.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
index 6097f80..d31f07e 100644
--- a/backend/src/llvm/llvm_passes.cpp
+++ b/backend/src/llvm/llvm_passes.cpp
@@ -141,6 +141,7 @@ namespace gbe
       case Type::IntegerTyID:
       case Type::FloatTyID:
       case Type::DoubleTyID:
+      case Type::HalfTyID:
         return getTypeBitSize(unit, Ty)/8;
       case Type::ArrayTyID:
         return getAlignmentByte(unit, cast<ArrayType>(Ty)->getElementType());
@@ -165,6 +166,7 @@ namespace gbe
       case Type::VoidTyID:    NOT_SUPPORTED;
       case Type::PointerTyID: return unit.getPointerSize();
       case Type::IntegerTyID: return cast<IntegerType>(Ty)->getBitWidth();
+      case Type::HalfTyID:    return 16;
       case Type::FloatTyID:   return 32;
       case Type::DoubleTyID:  return 64;
       case Type::VectorTyID:
-- 
1.7.9.5

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list