forked from KhronosGroup/SYCL-CTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaspect_set.h
51 lines (42 loc) · 1.59 KB
/
aspect_set.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*******************************************************************************
//
// SYCL 2020 Conformance Test Suite
//
// Provide generic compile-time aspect sets support
//
*******************************************************************************/
#ifndef __SYCLCTS_UTIL_ASPECT_SET_H
#define __SYCLCTS_UTIL_ASPECT_SET_H
#include "../tests/common/common.h"
#include <set>
#include <string>
namespace sycl_cts::util::aspect {
/** @brief Provides set of aspects to work with
* @details Example of usage:
* util::aspect::aspect_set set1{
* sycl::aspect::cpu,
* sycl::aspect::gpu,
* sycl::aspect::fp16,
* sycl::aspect::fp64
* };
* util::aspect::aspect_set set2{
* sycl::aspect::custom,
* sycl::aspect::queue_profiling,
* sycl::aspect::fp16,
* sycl::aspect::fp64
* } ;
* util::aspect::aspect_set intersection;
* std::set_intersection(set1.begin(), set1.end(),
* set2.begin(), set2.end(),
* std::back_inserter(intersection));
* log.note(util::aspect::to_string(intersections));
*/
using aspect_set = std::set<sycl::aspect>;
/** @brief Provides string representation of sycl::aspect
*/
std::string to_string(sycl::aspect asp);
/** @brief Provides string representation of util::aspect::aspect_set
*/
std::string to_string(const aspect_set &asp_set);
} // namespace sycl_cts::util::aspect
#endif // __SYCLCTS_UTIL_ASPECT_SET_H