summaryrefslogtreecommitdiff
path: root/cpp/Element.cpp
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-12-02 11:40:54 -0800
committerPirama Arumuga Nainar <pirama@google.com>2016-02-17 18:56:53 -0800
commit566168431399086c146b2f845f6d0128852c9686 (patch)
tree6c4ef536539199a390eadc39ddfa746a0ef72c55 /cpp/Element.cpp
parentef5a67ff7097ff4af054d07060c42e1e5ce9bad0 (diff)
downloadrs-566168431399086c146b2f845f6d0128852c9686.tar.gz
Add float16 elements to C++ API
Bug: 25972767 Add float16 elements to C++ API and test the ability to create float16 allocations. Caveats: - Element::F16 and such are accessible to the host-side code irrespective of the target API level. This is because right now, target API level seems to be set at runtime instead of compile time. - We added float16 to RenderScript starting API level 23. Since we cannot compile RS CPP apps targeting this level, Scripts cannot manipulate float16 data yet. Change-Id: I2bfba13fcad1c3aa984e97b44765fd2a57a054ac
Diffstat (limited to 'cpp/Element.cpp')
-rw-r--r--cpp/Element.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/Element.cpp b/cpp/Element.cpp
index e7461b6a..9a96ad1b 100644
--- a/cpp/Element.cpp
+++ b/cpp/Element.cpp
@@ -88,6 +88,7 @@ CREATE_USER(U32, UNSIGNED_32);
CREATE_USER(I32, SIGNED_32);
CREATE_USER(U64, UNSIGNED_64);
CREATE_USER(I64, SIGNED_64);
+CREATE_USER(F16, FLOAT_16);
CREATE_USER(F32, FLOAT_32);
CREATE_USER(F64, FLOAT_64);
CREATE_USER(ELEMENT, ELEMENT);
@@ -140,6 +141,7 @@ CREATE_VECTOR(U32, UNSIGNED_32);
CREATE_VECTOR(I32, SIGNED_32);
CREATE_VECTOR(U64, UNSIGNED_64);
CREATE_VECTOR(I64, SIGNED_64);
+CREATE_VECTOR(F16, FLOAT_16);
CREATE_VECTOR(F32, FLOAT_32);
CREATE_VECTOR(F64, FLOAT_64);