MCPcopy Create free account
hub / github.com/boostorg/compute / binary

Method binary

include/boost/compute/program.hpp:164–180  ·  view source on GitHub ↗

Returns the binary for the program.

Source from the content-addressed store, hash-verified

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

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