MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / binary

Method binary

compute/include/boost/compute/program.hpp:165–181  ·  view source on GitHub ↗

Returns the binary for the program.

Source from the content-addressed store, hash-verified

163
164 /// Returns the binary for the program.
165 std::vector<unsigned char> binary() const
166 {
167 size_t binary_size = get_info<size_t>(CL_PROGRAM_BINARY_SIZES);
168 std::vector<unsigned char> binary(binary_size);
169
170 unsigned char *binary_ptr = &binary[0];
171 cl_int error = clGetProgramInfo(m_program,
172 CL_PROGRAM_BINARIES,
173 sizeof(unsigned char **),
174 &binary_ptr,
175 0);
176 if(error != CL_SUCCESS){
177 BOOST_THROW_EXCEPTION(opencl_error(error));
178 }
179
180 return binary;
181 }
182
183 #if defined(BOOST_COMPUTE_CL_VERSION_2_1) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
184 /// Returns the SPIR-V binary for the program.

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80
save_program_binaryMethod · 0.80

Calls 1

opencl_errorClass · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64