rocPRIM
device_transform_config.hpp
1 // Copyright (c) 2018-2023 Advanced Micro Devices, Inc. All rights reserved.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 // THE SOFTWARE.
20 
21 #ifndef ROCPRIM_DEVICE_DEVICE_TRANSFORM_CONFIG_HPP_
22 #define ROCPRIM_DEVICE_DEVICE_TRANSFORM_CONFIG_HPP_
23 
24 #include <type_traits>
25 
26 #include "../config.hpp"
27 #include "../functional.hpp"
28 #include "../detail/various.hpp"
29 
30 #include "detail/device_config_helper.hpp"
31 
34 
35 BEGIN_ROCPRIM_NAMESPACE
36 
37 namespace detail
38 {
39 
40 // device transform does not have config tuning
41 template<unsigned int arch, class value_type>
43 {};
44 
45 template<typename TransformConfig>
46 constexpr transform_config_params wrap_transform_config()
47 {
49  {
50  TransformConfig::block_size,
51  TransformConfig::items_per_thread,
52  TransformConfig::size_limit,
53  }
54  };
55 }
56 
57 template<typename TransformConfig, typename>
59 {
60  template<target_arch Arch>
62  {
63  static constexpr transform_config_params params = wrap_transform_config<TransformConfig>();
64  };
65 };
66 
67 template<typename Value>
69 {
70  template<target_arch Arch>
71  struct architecture_config
72  {
73  static constexpr transform_config_params params = wrap_transform_config<
75  };
76 };
77 
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 template<typename TransformConfig, typename Value>
80 template<target_arch Arch>
83 
84 template<typename Value>
85 template<target_arch Arch>
88 #endif // DOXYGEN_SHOULD_SKIP_THIS
89 
90 } // end namespace detail
91 
92 END_ROCPRIM_NAMESPACE
93 
95 // end of group primitivesmodule_deviceconfigs
96 
97 #endif // ROCPRIM_DEVICE_DEVICE_TRANSFORM_CONFIG_HPP_
Special type used to show that the given device-level operation will be executed with optimal configu...
Definition: config_types.hpp:45
Definition: device_transform_config.hpp:42
Deprecated: Configuration of device-level scan primitives.
Definition: block_histogram.hpp:62
Definition: device_transform_config.hpp:58
Definition: device_config_helper.hpp:516
Definition: device_config_helper.hpp:559
Definition: test_device_binary_search.cpp:37
Definition: device_transform_config.hpp:61