MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / makeDefault

Method makeDefault

include/CL/opencl.hpp:6895–6920  ·  view source on GitHub ↗

! \brief Create the default command queue returned by @ref getDefault. * * It sets default_error_ to indicate success or failure. It does not throw * @c cl::Error. */

Source from the content-addressed store, hash-verified

6893 * @c cl::Error.
6894 */
6895 static void makeDefault()
6896 {
6897 /* We don't want to throw an error from this function, so we have to
6898 * catch and set the error flag.
6899 */
6900#if defined(CL_HPP_ENABLE_EXCEPTIONS)
6901 try
6902#endif
6903 {
6904 int error;
6905 Context context = Context::getDefault(&error);
6906
6907 if (error != CL_SUCCESS) {
6908 default_error_ = error;
6909 }
6910 else {
6911 Device device = Device::getDefault();
6912 default_ = CommandQueue(context, device, 0, &default_error_);
6913 }
6914 }
6915#if defined(CL_HPP_ENABLE_EXCEPTIONS)
6916 catch (cl::Error &e) {
6917 default_error_ = e.err();
6918 }
6919#endif
6920 }
6921
6922 /*! \brief Create the default command queue.
6923 *

Callers

nothing calls this directly

Calls 1

CommandQueueClass · 0.70

Tested by

no test coverage detected