xref: /aosp_15_r20/frameworks/rs/script_api/rs_io.spec (revision e1eccf28f96817838ad6867f7f39d2351ec11f56)
1*e1eccf28SAndroid Build Coastguard Worker#
2*e1eccf28SAndroid Build Coastguard Worker# Copyright (C) 2015 The Android Open Source Project
3*e1eccf28SAndroid Build Coastguard Worker#
4*e1eccf28SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
5*e1eccf28SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
6*e1eccf28SAndroid Build Coastguard Worker# You may obtain a copy of the License at
7*e1eccf28SAndroid Build Coastguard Worker#
8*e1eccf28SAndroid Build Coastguard Worker#      http://www.apache.org/licenses/LICENSE-2.0
9*e1eccf28SAndroid Build Coastguard Worker#
10*e1eccf28SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
11*e1eccf28SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
12*e1eccf28SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*e1eccf28SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
14*e1eccf28SAndroid Build Coastguard Worker# limitations under the License.
15*e1eccf28SAndroid Build Coastguard Worker#
16*e1eccf28SAndroid Build Coastguard Worker
17*e1eccf28SAndroid Build Coastguard Workerheader:
18*e1eccf28SAndroid Build Coastguard Workersummary: Input/Output Functions
19*e1eccf28SAndroid Build Coastguard Workerdescription:
20*e1eccf28SAndroid Build Coastguard Worker These functions are used to:<ul>
21*e1eccf28SAndroid Build Coastguard Worker <li>Send information to the Java client, and</li>
22*e1eccf28SAndroid Build Coastguard Worker#TODO We need better documentation for:
23*e1eccf28SAndroid Build Coastguard Worker <li>Send the processed allocation or receive the next allocation to process.</li></ul>
24*e1eccf28SAndroid Build Coastguard Workerend:
25*e1eccf28SAndroid Build Coastguard Worker
26*e1eccf28SAndroid Build Coastguard Workerfunction: rsAllocationIoReceive
27*e1eccf28SAndroid Build Coastguard Workerversion: 16
28*e1eccf28SAndroid Build Coastguard Workerret: void
29*e1eccf28SAndroid Build Coastguard Workerarg: rs_allocation a, "Allocation to work on."
30*e1eccf28SAndroid Build Coastguard Workersummary: Receive new content from the queue
31*e1eccf28SAndroid Build Coastguard Workerdescription:
32*e1eccf28SAndroid Build Coastguard Worker Receive a new set of contents from the queue.
33*e1eccf28SAndroid Build Coastguard Worker#TODO We need better documentation.
34*e1eccf28SAndroid Build Coastguard Worker
35*e1eccf28SAndroid Build Coastguard Worker This function should not be called from inside a kernel, or from any function
36*e1eccf28SAndroid Build Coastguard Worker that may be called directly or indirectly from a kernel. Doing so would cause a
37*e1eccf28SAndroid Build Coastguard Worker runtime error.
38*e1eccf28SAndroid Build Coastguard Workertest: none
39*e1eccf28SAndroid Build Coastguard Workerend:
40*e1eccf28SAndroid Build Coastguard Worker
41*e1eccf28SAndroid Build Coastguard Workerfunction: rsAllocationIoSend
42*e1eccf28SAndroid Build Coastguard Workerversion: 16
43*e1eccf28SAndroid Build Coastguard Workerret: void
44*e1eccf28SAndroid Build Coastguard Workerarg: rs_allocation a, "Allocation to work on."
45*e1eccf28SAndroid Build Coastguard Workersummary: Send new content to the queue
46*e1eccf28SAndroid Build Coastguard Workerdescription:
47*e1eccf28SAndroid Build Coastguard Worker Send the contents of the Allocation to the queue.
48*e1eccf28SAndroid Build Coastguard Worker#TODO We need better documentation.
49*e1eccf28SAndroid Build Coastguard Worker
50*e1eccf28SAndroid Build Coastguard Worker This function should not be called from inside a kernel, or from any function
51*e1eccf28SAndroid Build Coastguard Worker that may be called directly or indirectly from a kernel. Doing so would cause a
52*e1eccf28SAndroid Build Coastguard Worker runtime error.
53*e1eccf28SAndroid Build Coastguard Workertest: none
54*e1eccf28SAndroid Build Coastguard Workerend:
55*e1eccf28SAndroid Build Coastguard Worker
56*e1eccf28SAndroid Build Coastguard Workerfunction: rsSendToClient
57*e1eccf28SAndroid Build Coastguard Workerret: bool
58*e1eccf28SAndroid Build Coastguard Workerarg: int cmdID
59*e1eccf28SAndroid Build Coastguard Workersummary: Send a message to the client, non-blocking
60*e1eccf28SAndroid Build Coastguard Workerdescription:
61*e1eccf28SAndroid Build Coastguard Worker Sends a message back to the client.  This call does not block.
62*e1eccf28SAndroid Build Coastguard Worker It returns true if the message was sent and false if the
63*e1eccf28SAndroid Build Coastguard Worker message queue is full.
64*e1eccf28SAndroid Build Coastguard Worker
65*e1eccf28SAndroid Build Coastguard Worker A message ID is required.  The data payload is optional.
66*e1eccf28SAndroid Build Coastguard Worker
67*e1eccf28SAndroid Build Coastguard Worker See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
68*e1eccf28SAndroid Build Coastguard Workertest: none
69*e1eccf28SAndroid Build Coastguard Workerend:
70*e1eccf28SAndroid Build Coastguard Worker
71*e1eccf28SAndroid Build Coastguard Workerfunction: rsSendToClient
72*e1eccf28SAndroid Build Coastguard Workerret: bool
73*e1eccf28SAndroid Build Coastguard Workerarg: int cmdID
74*e1eccf28SAndroid Build Coastguard Workerarg: const void* data, "Application specific data."
75*e1eccf28SAndroid Build Coastguard Workerarg: uint len, "Length of the data, in bytes."
76*e1eccf28SAndroid Build Coastguard Workertest: none
77*e1eccf28SAndroid Build Coastguard Workerend:
78*e1eccf28SAndroid Build Coastguard Worker
79*e1eccf28SAndroid Build Coastguard Workerfunction: rsSendToClientBlocking
80*e1eccf28SAndroid Build Coastguard Workerret: void
81*e1eccf28SAndroid Build Coastguard Workerarg: int cmdID
82*e1eccf28SAndroid Build Coastguard Workersummary: Send a message to the client, blocking
83*e1eccf28SAndroid Build Coastguard Workerdescription:
84*e1eccf28SAndroid Build Coastguard Worker Sends a message back to the client.  This function will block
85*e1eccf28SAndroid Build Coastguard Worker until there is room on the message queue for this message.
86*e1eccf28SAndroid Build Coastguard Worker This function may return before the message was delivered and
87*e1eccf28SAndroid Build Coastguard Worker processed by the client.
88*e1eccf28SAndroid Build Coastguard Worker
89*e1eccf28SAndroid Build Coastguard Worker A message ID is required.  The data payload is optional.
90*e1eccf28SAndroid Build Coastguard Worker
91*e1eccf28SAndroid Build Coastguard Worker See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
92*e1eccf28SAndroid Build Coastguard Workertest: none
93*e1eccf28SAndroid Build Coastguard Workerend:
94*e1eccf28SAndroid Build Coastguard Worker
95*e1eccf28SAndroid Build Coastguard Workerfunction: rsSendToClientBlocking
96*e1eccf28SAndroid Build Coastguard Workerret: void
97*e1eccf28SAndroid Build Coastguard Workerarg: int cmdID
98*e1eccf28SAndroid Build Coastguard Workerarg: const void* data, "Application specific data."
99*e1eccf28SAndroid Build Coastguard Workerarg: uint len, "Length of the data, in bytes."
100*e1eccf28SAndroid Build Coastguard Workertest: none
101*e1eccf28SAndroid Build Coastguard Workerend:
102