diff --git a/src/runtime_src/core/common/api/CMakeLists.txt b/src/runtime_src/core/common/api/CMakeLists.txt index 0a706946d5f..9b0c3cdd4c9 100644 --- a/src/runtime_src/core/common/api/CMakeLists.txt +++ b/src/runtime_src/core/common/api/CMakeLists.txt @@ -1,16 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved. - -# if (CMAKE_BUILD_TYPE STREQUAL "Debug") -# find_program(CLANG_TIDY "clang-tidy" HINT /home/stsoe/git-nobkup/llvm-project/build) -# if(NOT CLANG_TIDY) -# message(WARNING "-- clang-tidy not found, cannot enable static analysis") -# else() -# message("-- Enabling clang-tidy") -# set(CMAKE_CXX_CLANG_TIDY "/home/stsoe/git-nobkup/llvm-project/build/bin/clang-tidy") -# endif() -# endif() - add_library(core_common_api_library_objects OBJECT context_mgr.cpp hw_queue.cpp diff --git a/src/runtime_src/core/include/xrt/xrt_hw_context.h b/src/runtime_src/core/include/xrt/xrt_hw_context.h index 18cae0bb51c..2fd5d59845b 100644 --- a/src/runtime_src/core/include/xrt/xrt_hw_context.h +++ b/src/runtime_src/core/include/xrt/xrt_hw_context.h @@ -76,12 +76,6 @@ class hw_context : public detail::pimpl */ hw_context() = default; - /** - * ~hw_context() - Destructor - */ - XCL_DRIVER_DLLESPEC - ~hw_context(); - /** * hw_context() - Constructor with QoS control * @@ -126,6 +120,34 @@ class hw_context : public detail::pimpl {} /// @endcond + /** + * hw_context() - Copy ctor + */ + hw_context(const hw_context&) = default; + + /** + * hw_context() - Move ctor + */ + hw_context(hw_context&&) = default; + + /** + * ~hw_context() - Destructor + */ + XCL_DRIVER_DLLESPEC + ~hw_context(); + + /** + * operator= () - Copy assignment + */ + hw_context& + operator=(const hw_context&) = default; + + /** + * operator= () - Move assignment + */ + hw_context& + operator=(hw_context&&) = default; + ///@cond // Undocument experimental API to change the QoS of a hardware context // Subject to change or removal diff --git a/src/runtime_src/core/include/xrt/xrt_kernel.h b/src/runtime_src/core/include/xrt/xrt_kernel.h index fc7e4b94922..b3d0ffe2416 100644 --- a/src/runtime_src/core/include/xrt/xrt_kernel.h +++ b/src/runtime_src/core/include/xrt/xrt_kernel.h @@ -130,12 +130,6 @@ class run */ run() = default; - /** - * ~run() - Destruct run object - */ - XCL_DRIVER_DLLESPEC - ~run(); - /** * run() - Construct run object from a kernel object * @@ -145,6 +139,34 @@ class run explicit run(const kernel& krnl); + /** + * run() - Copy ctor + */ + run(const run&) = default; + + /** + * run() - Move ctor + */ + run(run&&) = default; + + /** + * ~run() - Destruct run object + */ + XCL_DRIVER_DLLESPEC + ~run(); + + /** + * operator= () - Copy assignment + */ + run& + operator=(const run&) = default; + + /** + * operator= () - Move assignment + */ + run& + operator=(run&&) = default; + /** * start() - Start one execution of a run. * @@ -676,12 +698,6 @@ class kernel */ kernel() = default; - /** - * Destructor for kernel - needed for tracing - */ - XCL_DRIVER_DLLESPEC - ~kernel(); - /** * kernel() - Constructor from a device and xclbin * @@ -727,6 +743,34 @@ class kernel cu_access_mode mode = cu_access_mode::shared); /// @endcond + /** + * kernel() - Copy ctor + */ + kernel(const kernel&) = default; + + /** + * kernel() - Move ctor + */ + kernel(kernel&&) = default; + + /** + * Destructor for kernel - needed for tracing + */ + XCL_DRIVER_DLLESPEC + ~kernel(); + + /** + * operator= () - Copy assignment + */ + kernel& + operator=(const kernel&) = default; + + /** + * operator= () - Move assignment + */ + kernel& + operator=(kernel&&) = default; + /** * operator() - Invoke the kernel function *