| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 1 | /* | 
| Jason Sams | 80d8190 | 2012-09-13 17:00:48 -0700 | [diff] [blame] | 2 | * Copyright (C) 2012 The Android Open Source Project | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 3 | * | 
|  | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | * you may not use this file except in compliance with the License. | 
|  | 6 | * You may obtain a copy of the License at | 
|  | 7 | * | 
|  | 8 | *      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | * | 
|  | 10 | * Unless required by applicable law or agreed to in writing, software | 
|  | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | * See the License for the specific language governing permissions and | 
|  | 14 | * limitations under the License. | 
|  | 15 | */ | 
|  | 16 |  | 
|  | 17 | package android.renderscript; | 
|  | 18 |  | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 19 | /** | 
| kopriva | 6a7f167 | 2018-03-20 17:39:17 -0700 | [diff] [blame] | 20 | * Base class for all Intrinsic scripts. An intrinsic is a script | 
|  | 21 | * that implements a pre-defined function. Intrinsics are | 
|  | 22 | * provided to provide efficient implementations of common | 
| Jason Sams | 80d8190 | 2012-09-13 17:00:48 -0700 | [diff] [blame] | 23 | * operations. | 
|  | 24 | * | 
|  | 25 | * Not intended for direct use. | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 26 | **/ | 
| Jason Sams | 80d8190 | 2012-09-13 17:00:48 -0700 | [diff] [blame] | 27 | public abstract class ScriptIntrinsic extends Script { | 
| Tim Murray | 7a629fa | 2013-11-19 12:45:54 -0800 | [diff] [blame] | 28 | ScriptIntrinsic(long id, RenderScript rs) { | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 29 | super(id, rs); | 
| Jason Sams | 1c8da1c | 2014-06-23 15:15:08 -0700 | [diff] [blame] | 30 | if (id == 0) { | 
|  | 31 | throw new RSRuntimeException("Loading of ScriptIntrinsic failed."); | 
|  | 32 | } | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 33 | } | 
| Jason Sams | 6ab9768 | 2012-08-10 12:09:43 -0700 | [diff] [blame] | 34 | } |