diff options
| author | Pirama Arumuga Nainar <pirama@google.com> | 2015-12-02 11:40:54 -0800 |
|---|---|---|
| committer | Pirama Arumuga Nainar <pirama@google.com> | 2016-02-18 11:36:39 -0800 |
| commit | 1f6041ddc7658e252797626faae38db759413edc (patch) | |
| tree | 4a951e9ca3542a89b8c7c600fdfa2af465245e94 /cpp/Element.cpp | |
| parent | 291330fbaf7486a1cea33de7dd26c18e57c71391 (diff) | |
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
(cherry picked from commit 566168431399086c146b2f845f6d0128852c9686)
Diffstat (limited to 'cpp/Element.cpp')
| -rw-r--r-- | cpp/Element.cpp | 2 |
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); |
