15d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy/*
25d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * Copyright (C) 2016 The Android Open Source Project
35d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
45d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * Licensed under the Apache License, Version 2.0 (the "License");
55d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * you may not use this file except in compliance with the License.
65d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * You may obtain a copy of the License at
75d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
85d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *      http://www.apache.org/licenses/LICENSE-2.0
95d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
105d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * Unless required by applicable law or agreed to in writing, software
115d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * distributed under the License is distributed on an "AS IS" BASIS,
125d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * See the License for the specific language governing permissions and
145d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * limitations under the License.
155d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy */
165d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guypackage android.annotation;
175d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy
185d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport java.lang.annotation.Retention;
195d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport java.lang.annotation.Target;
205d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy
215d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport static java.lang.annotation.ElementType.FIELD;
225d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport static java.lang.annotation.ElementType.LOCAL_VARIABLE;
235d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport static java.lang.annotation.ElementType.METHOD;
245d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport static java.lang.annotation.ElementType.PARAMETER;
255d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guyimport static java.lang.annotation.RetentionPolicy.SOURCE;
265d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy
275d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy/**
285d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * <p>Denotes that the annotated element represents a half-precision floating point
295d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * value. Such values are stored in short data types and can be manipulated with
305d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * the {@link android.util.Half} class. If applied to an array of short, every
315d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * element in the array represents a half-precision float.</p>
325d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
335d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * <p>Example:</p>
345d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
355d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * <pre>{@code
365d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * public abstract void setPosition(@HalfFloat short x, @HalfFloat short y, @HalfFloat short z);
375d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * }</pre>
385d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
395d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * @see android.util.Half
4095b52fd187564cabceb3309daa4ee6ddf697de58Romain Guy * @see android.util.Half#toHalf(float)
415d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * @see android.util.Half#toFloat(short)
425d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy *
435d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy * @hide
445d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy */
455d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy@Retention(SOURCE)
465d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy@Target({PARAMETER, METHOD, LOCAL_VARIABLE, FIELD})
475d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guypublic @interface HalfFloat {
485d7e2352e7369ca4f75b3f883749f908cc82ecdeRomain Guy}
49