ABSTRACT

The backend should verify that the outputs of the program match the signature of the destination stream and that the program is a valid stream program. Every shading (Sh) backend needs to implement the ShBackend interface, found in the ShBackend. hpp file. The ShBackendCode class represents compiled code for a particular backend. The upload function is used to send this compiled code to the appropriate processor. Sh includes a relatively small number of backends. The ShBackend class keeps track of all instantiated backends automatically. It supports looking up backends by name using the static lookup member functions. Sh supports many operations that may not be directly available in a particular backend. Sh allows programs to read from outputs and write to inputs. Many backends, in particular older graphics processing unit backends, set a limit on the number of instructions which can be executed in a single pass.