1ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung/* 2ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * Copyright (C) 2016 The Android Open Source Project 3ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * 4ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * Licensed under the Apache License, Version 2.0 (the "License"); 5ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * you may not use this file except in compliance with the License. 6ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * You may obtain a copy of the License at 7ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * 8ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * http://www.apache.org/licenses/LICENSE-2.0 9ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * 10ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * Unless required by applicable law or agreed to in writing, software 11ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * distributed under the License is distributed on an "AS IS" BASIS, 12ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * See the License for the specific language governing permissions and 14ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung * limitations under the License. 15ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung */ 16ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung 17ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung#pragma version(1) 18ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung 19ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung#pragma rs java_package_name(com.android.rs.rsov.test) 20ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung 21ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sungfloat4 RS_KERNEL invert(float4 a) { 22ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung return 1.0f - a; 23ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung} 24ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung 25ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sungfloat4 RS_KERNEL scalebytwo(float4 a) { 26ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung return 2.0f * a; 27ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung} 28ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung 29ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sungfloat4 RS_KERNEL scalebythree(float4 a) { 30ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung return 3.0f * a; 31ffa85366645c163dd529644ba5b8950c4c588d20I-Jui (Ray) Sung} 32