7 #ifndef CUDA_API_WRAPPERS_FATBIN_BUILDER_OPTIONS_HPP_     8 #define CUDA_API_WRAPPERS_FATBIN_BUILDER_OPTIONS_HPP_    10 #include "../api/device_properties.hpp"    11 #include "../api/detail/option_marshalling.hpp"    12 #include "../api/types.hpp"    23 namespace fatbin_builder {
    45         width_32_bits = 
false, width_64_bits = 
true    47     optional<bool> use_64_bit_entry_width{width_64_bits};
    50         dont_compress = 
false, do_compress = 
true    52     optional<bool> compress{do_compress};
    55         only_compress_large_objects = 
false, compression_for_everything = 
true    57     optional<bool> apply_compression_to_small_objects{only_compress_large_objects};
    62     optional<ecosystem_t> ecosystem;
    67     optional<host_os_t> targeted_host_os;
    72 struct marshalled_options_t {
    74     ::std::string option_str;
    81 namespace marshalling {
    85 template <
typename MarshalTarget, 
typename Delimiter>
    86 struct gadget<fatbin_builder::
options_t, MarshalTarget, Delimiter> {
    89         MarshalTarget &marshalled, Delimiter delimiter,
    90         bool need_delimiter_after_last_option)
    93         opt_start_t<Delimiter> opt_start { delimiter };
    94         if (opts.use_64_bit_entry_width) {
    95             marshalled << opt_start << 
'-' << (opts.use_64_bit_entry_width.value() ? 
"64" : 
"32");
    98             marshalled << opt_start << 
"-compress=" << (opts.compress.value() ? 
"true" : 
"false");
   100         if (opts.apply_compression_to_small_objects.value_or(
false)) {
   101             marshalled << opt_start << 
"-compress-all";
   103         if (opts.ecosystem) {
   104             marshalled << opt_start << 
'-' << ((opts.ecosystem.value() == options_t::opencl) ? 
"opencl" : 
"cuda");
   106         if (opts.targeted_host_os) {
   107             marshalled << opt_start << 
"-host=" << ((opts.targeted_host_os.value() == options_t::windows) ? 
"windows" : 
"linux");
   109         if (need_delimiter_after_last_option) {
   110             marshalled << opt_start;
   121 #endif // CUDA_API_WRAPPERS_FATBIN_BUILDER_OPTIONS_HPP_ Definitions and functionality wrapping CUDA APIs. 
Definition: array.hpp:22
 
::std::size_t size_t
A size type for use throughout the wrappers library (except when specific API functions limit the siz...
Definition: types.hpp:81
 
Definition: builder_options.hpp:42