Lines Matching defs:binary

65    enum binary::argument::type
69 return binary::argument::scalar;
71 return binary::argument::global;
73 return binary::argument::local;
75 return binary::argument::global;
97 enum binary::argument::type
107 return binary::argument::image_rd;
109 return binary::argument::image_wr;
122 binary::section
124 enum binary::section::type section_type) {
126 binary::section text { 0, section_type, header.num_bytes, {} };
135 binary
144 std::vector<binary::argument> args;
147 binary b;
152 std::unordered_map<SpvId, binary::argument> types;
294 // 4GB-wide, and even if they did, a clover::binary::argument size
303 types[id] = { binary::argument::scalar, size, size, size,
304 binary::argument::zero_ext };
326 types[id] = { binary::argument::scalar, size, size,
328 binary::argument::zero_ext };
343 // types allowed as kernel arguments. And since the binary has
356 types[id] = { binary::argument::scalar, struct_size, struct_size,
357 struct_align, binary::argument::zero_ext };
367 // types allowed as kernel arguments. And since the binary has
376 types[id] = { binary::argument::scalar, size, size, size,
377 binary::argument::zero_ext };
394 binary::size_t alignment;
402 static_cast<binary::size_t>(pointer_byte_size),
404 binary::argument::zero_ext };
410 types[get<SpvId>(inst, 1)] = { binary::argument::sampler,
420 binary::argument::zero_ext };
460 arg.ext_type = binary::argument::sign_ext;
463 arg.ext_type = binary::argument::zero_ext;
517 binary::section::text_intermediate));
522 check_spirv_version(const device &dev, const char *binary,
524 const auto spirv_version = get<uint32_t>(binary, 1u);
667 unreachable("Only Physical32 and Physical64 are valid for OpenCL, and the binary was already validated");
681 // Copies the input binary and convert it to the endianness of the host CPU.
683 spirv_to_cpu(const std::string &binary)
685 const uint32_t first_word = get<uint32_t>(binary.data(), 0u);
687 return binary;
689 std::vector<char> cpu_endianness_binary(binary.size());
690 for (size_t i = 0; i < (binary.size() / 4u); ++i) {
691 const uint32_t word = get<uint32_t>(binary.data(), i);
755 clover::spirv::is_binary_spirv(const std::string &binary)
757 // A SPIR-V binary is at the very least 5 32-bit words, which represent the
759 if (binary.size() < 20u)
763 reinterpret_cast<const uint32_t *>(binary.data())[0u];
776 binary
777 clover::spirv::compile_program(const std::string &binary,
780 std::string source = spirv_to_cpu(binary);
798 binary
799 clover::spirv::link_program(const std::vector<binary> &binaries,
822 binary b;
824 const auto section_type = create_library ? binary::section::text_library :
825 binary::section::text_executable;
840 const auto &bsec = find([](const binary::section &sec) {
841 return sec.type == binary::section::text_intermediate ||
842 sec.type == binary::section::text_library;
888 clover::spirv::is_valid_spirv(const std::string &binary,
906 return spvTool.Validate(reinterpret_cast<const uint32_t *>(binary.data()),
907 binary.size() / 4u, validator_options);
911 clover::spirv::print_module(const std::string &binary,
918 return "Failed to create an spv_context for disassembling the binary.";
922 reinterpret_cast<const uint32_t *>(binary.data()),
923 binary.size() / 4u, SPV_BINARY_TO_TEXT_OPTION_NONE,
960 clover::spirv::is_binary_spirv(const std::string &binary)
966 clover::spirv::is_valid_spirv(const std::string &/*binary*/,
977 binary
978 clover::spirv::compile_program(const std::string &binary,
985 binary
986 clover::spirv::link_program(const std::vector<binary> &/*binaries*/,
994 clover::spirv::print_module(const std::string &binary,