/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011-2012 The Android Open Source Project
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00046 #ifndef __RS_CORE_RSH__
00047 #define __RS_CORE_RSH__
00048 
00049 #define _RS_RUNTIME extern
00050 
00051 #include "rs_types.rsh"
00052 #include "rs_allocation.rsh"
00053 #include "rs_atomic.rsh"
00054 #include "rs_cl.rsh"
00055 #include "rs_debug.rsh"
00056 #include "rs_element.rsh"
00057 #include "rs_math.rsh"
00058 #include "rs_matrix.rsh"
00059 #include "rs_object.rsh"
00060 #include "rs_quaternion.rsh"
00061 #include "rs_sampler.rsh"
00062 #include "rs_time.rsh"
00063 
00069 extern bool __attribute__((overloadable))
00070     rsSendToClient(int cmdID);
00074 extern bool __attribute__((overloadable))
00075     rsSendToClient(int cmdID, const void *data, uint len);
00080 extern void __attribute__((overloadable))
00081     rsSendToClientBlocking(int cmdID);
00085 extern void __attribute__((overloadable))
00086     rsSendToClientBlocking(int cmdID, const void *data, uint len);
00087 
00088 
00096 enum rs_for_each_strategy {
00097     RS_FOR_EACH_STRATEGY_SERIAL = 0,
00098     RS_FOR_EACH_STRATEGY_DONT_CARE = 1,
00099     RS_FOR_EACH_STRATEGY_DST_LINEAR = 2,
00100     RS_FOR_EACH_STRATEGY_TILE_SMALL= 3,
00101     RS_FOR_EACH_STRATEGY_TILE_MEDIUM = 4,
00102     RS_FOR_EACH_STRATEGY_TILE_LARGE = 5
00103 };
00104 
00105 
00110 typedef struct rs_script_call {
00111     enum rs_for_each_strategy strategy;
00112     uint32_t xStart;
00113     uint32_t xEnd;
00114     uint32_t yStart;
00115     uint32_t yEnd;
00116     uint32_t zStart;
00117     uint32_t zEnd;
00118     uint32_t arrayStart;
00119     uint32_t arrayEnd;
00120 } rs_script_call_t;
00121 
00138 #if !defined(RS_VERSION) || (RS_VERSION < 14)
00139 extern void __attribute__((overloadable))
00140     rsForEach(rs_script script, rs_allocation input,
00141               rs_allocation output, const void * usrData,
00142               const rs_script_call_t *sc);
00146 extern void __attribute__((overloadable))
00147     rsForEach(rs_script script, rs_allocation input,
00148               rs_allocation output, const void * usrData);
00149 #else
00150 
00169 extern void __attribute__((overloadable))
00170     rsForEach(rs_script script, rs_allocation input, rs_allocation output,
00171               const void * usrData, size_t usrDataLen, const rs_script_call_t *);
00175 extern void __attribute__((overloadable))
00176     rsForEach(rs_script script, rs_allocation input, rs_allocation output,
00177               const void * usrData, size_t usrDataLen);
00181 extern void __attribute__((overloadable))
00182     rsForEach(rs_script script, rs_allocation input, rs_allocation output);
00183 #endif
00184 
00185 
00186 
00187 #undef _RS_RUNTIME
00188 
00189 #endif