Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Restrict to one call to handler::set_spec_constant or handler::get_sp…
Browse files Browse the repository at this point in the history
…ec_constant per spec_id and per command group scope
  • Loading branch information
Naghasan committed Dec 12, 2019
1 parent 5825039 commit 5c6d8ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proposals/sycl_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,8 @@ public:
| `template<class T, spec_id<T>& s> spec_constant<T, s> set_spec_constant(T)` | Set the given value as the specialization constant value in the underlying module and returns a `spec_constant` handler usable in kernel. If the user specify to the handle a specific module to use, then the value given to `set_spec_constant` must match the the one used to build the module. In case of mismatch, the SYCL runtime raises an error. |
| `template<class T, spec_id<T>& s> spec_constant<T, s> get_spec_constant()` | Returns a `spec_constant` handler usable in kernel. |

Only one call to `set_spec_constant` or `get_spec_constant` is allowed per spec_id and per command group scope.
If more than one call per spec_id and per command group scope is made then an runtime exception is thrown.

Note the value of the specialization constant depends on the module that is used,
not on the placeholder object.
Expand Down

0 comments on commit 5c6d8ed

Please sign in to comment.