News
Scenome 21.7 — 2/14/2021
Release details are described below.
Table 1.1. Description of Changes.
Iterator Changes |
---|
Completed Phase 2 of the conversion to iterator-based algorithms. This included targeted refactoring of the Scenome Scripting Language codebase and testing of all affected systems. The first significant change is the addition of array view classes that wrap a pair of iterators. This provides necessary syntax sugar to significantly reduce the amount of code required to use iterators. You can work with the <ArrayViewT> types if you want shorter code. This type wraps a pair of <TypedIterator> objects of the related type. There are data interfaces for array objects ( SSL::GetView() ) that return an <ArrayViewT> object that wraps a pair of iterators. For example auto Float32ArrayView src_view = src_data.GetView(); wraps declaration and initialization/binding into a single line of code. This syntax almost matches the terseness of the previous algorithm system.
This example finds the min and max values in a 32-bit floating-point <Image>.
|
Table 1.2. Description of Changes.
Parallel ForEach |
---|
The second significant change is the deprecation of many previous array algorithms implementations and the replacement of these with a new algorithm SSL::ParallelForEach that allows you to write GLSL lambdas that run on collections. In the vast majority of common use cases, this offers great performance improvements over the C++ equivalent. Our benchmark tests involve 64MB <Image> objects. There is a cost to send and receive the data from the GPU and it is possible that in some cases, these costs can exceed the savings offered by using compute shaders to mutate the data. As with their C++ counterparts, it's possible to invalidate iterators. If you increase the underlying allocation, your iterator range will be short compared to the underlying collection, but, technically speaking, the iterators may remain stable. If you decrease the size of the underlying collection, your iterators may be out of range. Either way, any attempt to use/dereference an invalid iterator results in the iterator being cleared to constructor defaults.
The existing algorithm system provides basic support algorithms that are required for the application to operate without the GPU. As we implemented additional algorithms, it became clear that we couldn't easily implement the full range of algorithms that people need. In response to this, we implemented a generic algorithm, SSL::ParallelForEach that allows you to write compute shader lambdas in GLSL that operate over collections of primitive types.
The algorithm builds a compute shader, executes the shader, and returns. You can print the compute shader code that was used to modify the collection.
|
Table 1.3. Array view classes are strongly-typed and not available for polymorphic access through a base class. Supported view types are as follows:
View System Type | Base Class |
---|---|
<Int8ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Int16ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Int32ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Int64ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Uint8ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Uint16ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Uint32ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Uint64ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Float16ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Float32ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
<Float64ArrayView> | <ArrayViewT> Base class not accessible in SSL. |
Table 1.4. SSL types with view binding support are as follows:
View Binding Support | Status |
---|---|
<Image> | Supported |
<Int8Array> | Supported |
<Int16Array> | Supported |
<Int32Array> | Supported |
<Int64Array> | Supported |
<Uint8Array> | Supported |
<Uint16Array> | Supported |
<Uint32Array> | Supported |
<Uint64Array> | Supported |
<Float16Array> | Supported |
<Float32Array> | Supported |
<Float64Array> | Supported |
<Float32Matrix> | Supported |
<Float64Matrix> | Supported |
<Float32MatrixArray> | Not Yet Supported. Probably Scenome 21.7 or Scenome 21.8. |
<Float64MatrixArray> | Not Yet Supported. Probably Scenome 21.7 or Scenome 21.8. |