clang-tidy (#9)
- Fixed some clang-tidy warnings
- Fixed issue with omnitrace_launch_compiler + clang-tidy
[ROCm/rocprofiler-systems commit: 6af5b2a7e2]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
08dc696e47
Коммит
319da56515
@@ -4,6 +4,8 @@ project(omnitrace-dyninst-examples LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET "default")
|
||||
set(CMAKE_CXX_CLANG_TIDY)
|
||||
option(BUILD_SHARED_LIBS "Build dynamic libraries" ON)
|
||||
|
||||
add_subdirectory(transpose)
|
||||
add_subdirectory(parallel-overhead)
|
||||
@@ -11,15 +13,4 @@ add_subdirectory(code-coverage)
|
||||
add_subdirectory(user-api)
|
||||
add_subdirectory(openmp)
|
||||
add_subdirectory(mpi)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.16 AND (NOT DEFINED LULESH_BUILD_KOKKOS
|
||||
OR LULESH_BUILD_KOKKOS))
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"lulesh example cannot build Kokkos (requires CMake 3.16+, current version is ${CMAKE_VERSION})"
|
||||
)
|
||||
else()
|
||||
option(BUILD_SHARED_LIBS "Build dynamic libraries" ON)
|
||||
|
||||
add_subdirectory(lulesh)
|
||||
endif()
|
||||
add_subdirectory(lulesh)
|
||||
|
||||
@@ -55,6 +55,30 @@ CXX_COMPILER=${1}
|
||||
# remove the expected C++ compiler from the arguments
|
||||
shift
|
||||
|
||||
# discards the clang-tidy arguments
|
||||
if [ "$(basename ${1})" = "cmake" ] && [ "${2}" = "-E" ] && [ "${3}" = "__run_co_compile" ]; then
|
||||
c=1
|
||||
n=1
|
||||
for i in "${@}"
|
||||
do
|
||||
if [ "${i}" = "--" ]; then
|
||||
break;
|
||||
fi
|
||||
if [ "${c}" -gt 3 ]; then
|
||||
n=$((${n} + 1))
|
||||
fi
|
||||
c=$((${c} + 1))
|
||||
done
|
||||
|
||||
if [[ $# -gt ${c} ]]; then
|
||||
n=$((${n} + 3)) # add three because of the first 3 args
|
||||
for i in $(seq 1 1 ${n})
|
||||
do
|
||||
shift
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${CXX_COMPILER}" != "${1}" ]]; then
|
||||
debug-message $@
|
||||
# the command does not depend on omnitrace so just execute the command w/o re-directing to ${OMNITRACE_COMPILER}
|
||||
|
||||
@@ -1022,7 +1022,7 @@ omnitrace_finalize_hidden(void)
|
||||
auto& _aitr = get_timemory_hash_aliases(i);
|
||||
if(_hzero && _hitr)
|
||||
{
|
||||
for(auto itr : *_hitr)
|
||||
for(const auto& itr : *_hitr)
|
||||
_hzero->emplace(itr.first, itr.second);
|
||||
}
|
||||
if(_azero && _aitr)
|
||||
|
||||
@@ -53,10 +53,8 @@ TIMEMORY_DECLARE_TYPE_TRAIT(name, typename Tp)
|
||||
static constexpr auto value = NAME; \
|
||||
}; \
|
||||
template <> \
|
||||
struct name<type_list<__VA_ARGS__>> \
|
||||
{ \
|
||||
static constexpr auto value = NAME; \
|
||||
}; \
|
||||
struct name<type_list<__VA_ARGS__>> : name<__VA_ARGS__> \
|
||||
{}; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace thread_sampler
|
||||
{
|
||||
namespace
|
||||
{
|
||||
using tim::type_mutex;
|
||||
using auto_lock_t = tim::auto_lock_t;
|
||||
using promise_t = std::promise<void>;
|
||||
std::unique_ptr<promise_t> polling_finished = {};
|
||||
|
||||
Ссылка в новой задаче
Block a user