327
327
namespace sycl::ext::oneapi::experimental {
328
328
329
329
struct include_files {
330
- std::vector<std::string> names;
331
- std::vector<std::string> contents;
332
- include_files(const std::string &name, const std::string &content); (1)
333
- include_files(const std::vector<std::string> &names, (2)
334
- const std::vector<std::string> &contents);
330
+ include_files(); (1)
331
+ include_files(const std::string &name, const std::string &content); (2)
332
+ void add(const std::string &name, const std::string &content); (3)
335
333
};
336
334
using include_files_key = include_files;
337
335
@@ -374,13 +372,18 @@ content via the `include_files` property:
374
372
The include files defined via the `include_files` property are searched first,
375
373
before these implicitly available headers.
376
374
377
- _Effects (1):_ Constructs an `include_files` property with a single (_Name_,
375
+ _Effects (1):_ Creates a new `include_files` property with no (_Name_,
376
+ _Content_) pairs.
377
+
378
+ _Effects (2):_ Creates a new `include_files` property with a single (_Name_,
378
379
_Content_) pair.
379
380
380
- _Effects (2):_ Constructs an `include_files` property with a collection of
381
- (_Name_, _Content_) pairs.
382
- The `names` vector provides the _Name_ strings, and the `contents` vector
383
- provides the _Content_ strings.
381
+ _Effects (3):_ Adds a (_Name_, _Content_) pair to the property.
382
+
383
+ _Throws (3):_
384
+
385
+ * An `exception` with the `errc::invalid` error code if there is already an
386
+ entry with `name` in this property.
384
387
|====
385
388
386
389
=== New properties for the `build` function
398
401
namespace sycl::ext::oneapi::experimental {
399
402
400
403
struct build_options {
401
- std::vector<std::string> opts;
402
- build_options(const std::string &opt); (1)
403
- build_options(const std::vector<std::string> &opts); (2)
404
+ build_options(); (1)
405
+ build_options(const std::string &opt); (2)
406
+ build_options(const std::vector<std::string> &opts); (3)
407
+ void add(const std::string &opt); (4)
404
408
};
405
409
using build_options_key = build_options;
406
410
@@ -420,12 +424,16 @@ options.
420
424
The `source_language::sycl` language does not define any standard build
421
425
options, but an implementation may support implementation-defined options.
422
426
423
- _Effects (1):_ Constructs a `build_options` property with a single build
427
+ _Effects (1):_ Constructs a `build_options` property with no build options.
428
+
429
+ _Effects (2):_ Constructs a `build_options` property with a single build
424
430
option.
425
431
426
- _Effects (2 ):_ Constructs a `build_options` property from a vector of build
432
+ _Effects (3 ):_ Constructs a `build_options` property from a vector of build
427
433
options.
428
434
435
+ _Effects (4):_ Adds `opt` to the end of the property's list of build options.
436
+
429
437
a|
430
438
[frame=all,grid=none]
431
439
!====
435
443
namespace sycl::ext::oneapi::experimental {
436
444
437
445
struct save_log {
438
- std::string *log;
439
446
save_log(std::string *to); (1)
440
447
};
441
448
using save_log_key = save_log;
478
485
namespace sycl::ext::oneapi::experimental {
479
486
480
487
struct registered_kernel_names {
481
- std::vector<std::string> names;
482
- registered_kernel_names(const std::string &name); (1)
483
- registered_kernel_names(const std::vector<std::string> &names); (2)
488
+ registered_kernel_names(); (1)
489
+ registered_kernel_names(const std::string &name); (2)
490
+ registered_kernel_names(const std::vector<std::string> &names); (3)
491
+ void add(const std::string &name); (4)
484
492
};
485
493
using registered_kernel_names_key = registered_kernel_names;
486
494
@@ -504,17 +512,26 @@ See the section below "Obtaining a kernel when the language is ``sycl``" for a
504
512
description of how this property is used with the `source_language::sycl`
505
513
language.
506
514
507
- _Preconditions:_ Each source language defines its own requirements for the
508
- strings in the `name` and `names` parameters.
509
- For the language `source_language::sycl`, each string must be a {cpp}
510
- expression for a pointer to a kernel function as defined below under "Obtaining
511
- a kernel when the language is ``sycl``".
515
+ _Effects (1):_ Creates a new `registered_kernel_names` property with no
516
+ registered kernel names.
512
517
513
- _Effects (1 ):_ Constructs a `registered_kernel_names` property with a single
514
- kernel name.
518
+ _Effects (2 ):_ Creates a new `registered_kernel_names` property with a single
519
+ registered kernel name.
515
520
516
- _Effects (2):_ Constructs a `registered_kernel_names` property from a vector of
517
- kernel names.
521
+ _Effects (3):_ Creates a new `registered_kernel_names` property from a vector
522
+ of kernel names.
523
+
524
+ _Effects (4):_ Adds `name` to the property's list of registered kernel names.
525
+
526
+ _Preconditions (2-4):_ Each source language defines its own requirements for
527
+ the registered kernel names.
528
+ For the language `source_language::sycl`, each name must be a {cpp} expression
529
+ for a pointer to a kernel function as defined below under "Obtaining a kernel
530
+ when the language is ``sycl``".
531
+
532
+ [_Note:_ It is not an error to have duplicate names in a
533
+ `registered_kernel_names` property, but the duplicates have no effect.
534
+ _{endnote}_]
518
535
|====
519
536
520
537
=== New constraint for kernel bundle member functions
0 commit comments