Home | History | Annotate | Download | only in script_api
      1 #
      2 # Copyright (C) 2015 The Android Open Source Project
      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 header:
     18 summary: Input/Output Functions
     19 description:
     20  These functions are used to:<ul>
     21  <li>Send information to the Java client, and</li>
     22 #TODO We need better documentation for:
     23  <li>Send the processed allocation or receive the next allocation to process.</li></ul>
     24 end:
     25 
     26 function: rsAllocationIoReceive
     27 version: 16
     28 ret: void
     29 arg: rs_allocation a, "Allocation to work on."
     30 summary: Receive new content from the queue
     31 description:
     32  Receive a new set of contents from the queue.
     33 #TODO We need better documentation.
     34 
     35  This function should not be called from inside a kernel, or from any function
     36  that may be called directly or indirectly from a kernel. Doing so would cause a
     37  runtime error.
     38 test: none
     39 end:
     40 
     41 function: rsAllocationIoSend
     42 version: 16
     43 ret: void
     44 arg: rs_allocation a, "Allocation to work on."
     45 summary: Send new content to the queue
     46 description:
     47  Send the contents of the Allocation to the queue.
     48 #TODO We need better documentation.
     49 
     50  This function should not be called from inside a kernel, or from any function
     51  that may be called directly or indirectly from a kernel. Doing so would cause a
     52  runtime error.
     53 test: none
     54 end:
     55 
     56 function: rsSendToClient
     57 ret: bool
     58 arg: int cmdID
     59 summary: Send a message to the client, non-blocking
     60 description:
     61  Sends a message back to the client.  This call does not block.
     62  It returns true if the message was sent and false if the
     63  message queue is full.
     64 
     65  A message ID is required.  The data payload is optional.
     66 
     67  See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
     68 test: none
     69 end:
     70 
     71 function: rsSendToClient
     72 ret: bool
     73 arg: int cmdID
     74 arg: const void* data, "Application specific data."
     75 arg: uint len, "Length of the data, in bytes."
     76 test: none
     77 end:
     78 
     79 function: rsSendToClientBlocking
     80 ret: void
     81 arg: int cmdID
     82 summary: Send a message to the client, blocking
     83 description:
     84  Sends a message back to the client.  This function will block
     85  until there is room on the message queue for this message.
     86  This function may return before the message was delivered and
     87  processed by the client.
     88 
     89  A message ID is required.  The data payload is optional.
     90 
     91  See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
     92 test: none
     93 end:
     94 
     95 function: rsSendToClientBlocking
     96 ret: void
     97 arg: int cmdID
     98 arg: const void* data, "Application specific data."
     99 arg: uint len, "Length of the data, in bytes."
    100 test: none
    101 end:
    102