mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
enable & switch to clang 6.0
Change-Id: I61910614ddaa37db18a3d995fa94efb03238279a Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ab507d73de
commit
972c080083
@@ -17,7 +17,7 @@ components:
|
|||||||
branch: infra
|
branch: infra
|
||||||
clean_on_sync: true
|
clean_on_sync: true
|
||||||
dest_dir: infra
|
dest_dir: infra
|
||||||
revision: 8b13573ecf55f1f1142a815fdc181d34c29c7574
|
revision: 5a57e424807a4fb6a2e4146211b8ae421baa3e30
|
||||||
type: git
|
type: git
|
||||||
internal:
|
internal:
|
||||||
branch: master
|
branch: master
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ SchedulerKernel &BuiltIns::getSchedulerKernel(Context &context) {
|
|||||||
};
|
};
|
||||||
std::call_once(schedulerBuiltIn.programIsInitialized, initializeSchedulerProgramAndKernel);
|
std::call_once(schedulerBuiltIn.programIsInitialized, initializeSchedulerProgramAndKernel);
|
||||||
|
|
||||||
|
UNRECOVERABLE_IF(schedulerBuiltIn.pKernel == nullptr);
|
||||||
return *static_cast<SchedulerKernel *>(schedulerBuiltIn.pKernel);
|
return *static_cast<SchedulerKernel *>(schedulerBuiltIn.pKernel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ class Storage {
|
|||||||
: rootPath(rootPath) {
|
: rootPath(rootPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~Storage() = default;
|
||||||
|
|
||||||
BuiltinResourceT load(const std::string &resourceName);
|
BuiltinResourceT load(const std::string &resourceName);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class BuiltinDispatchInfoBuilder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
BuiltinDispatchInfoBuilder(BuiltIns &kernelLib) : kernelsLib(kernelLib) {}
|
BuiltinDispatchInfoBuilder(BuiltIns &kernelLib) : kernelsLib(kernelLib) {}
|
||||||
|
virtual ~BuiltinDispatchInfoBuilder() = default;
|
||||||
|
|
||||||
template <typename... KernelsDescArgsT>
|
template <typename... KernelsDescArgsT>
|
||||||
void populate(Context &context, Device &device, EBuiltInOps operation, const char *options, KernelsDescArgsT &&... desc);
|
void populate(Context &context, Device &device, EBuiltInOps operation, const char *options, KernelsDescArgsT &&... desc);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class KmdNotifyHelper {
|
|||||||
public:
|
public:
|
||||||
KmdNotifyHelper() = delete;
|
KmdNotifyHelper() = delete;
|
||||||
KmdNotifyHelper(const KmdNotifyProperties *properties) : properties(properties){};
|
KmdNotifyHelper(const KmdNotifyProperties *properties) : properties(properties){};
|
||||||
|
MOCKABLE_VIRTUAL ~KmdNotifyHelper() = default;
|
||||||
|
|
||||||
bool obtainTimeoutParams(int64_t &timeoutValueOutput,
|
bool obtainTimeoutParams(int64_t &timeoutValueOutput,
|
||||||
bool quickKmdSleepRequest,
|
bool quickKmdSleepRequest,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Intel Corporation
|
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -103,7 +103,7 @@ class D3DSharingFunctions : public SharingFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
D3DSharingFunctions() = delete;
|
D3DSharingFunctions() = delete;
|
||||||
virtual ~D3DSharingFunctions(){};
|
|
||||||
static const uint32_t sharingId;
|
static const uint32_t sharingId;
|
||||||
|
|
||||||
MOCKABLE_VIRTUAL void createQuery(D3DQuery **query);
|
MOCKABLE_VIRTUAL void createQuery(D3DQuery **query);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class SharingContextBuilder {
|
|||||||
|
|
||||||
class SharingBuilderFactory {
|
class SharingBuilderFactory {
|
||||||
public:
|
public:
|
||||||
|
virtual ~SharingBuilderFactory() = default;
|
||||||
virtual std::unique_ptr<SharingContextBuilder> createContextBuilder() = 0;
|
virtual std::unique_ptr<SharingContextBuilder> createContextBuilder() = 0;
|
||||||
virtual std::string getExtensions() = 0;
|
virtual std::string getExtensions() = 0;
|
||||||
virtual void fillGlobalDispatchTable() = 0;
|
virtual void fillGlobalDispatchTable() = 0;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace OCLRT {
|
|||||||
class VASharingFunctions : public SharingFunctions {
|
class VASharingFunctions : public SharingFunctions {
|
||||||
public:
|
public:
|
||||||
VASharingFunctions(VADisplay vaDisplay);
|
VASharingFunctions(VADisplay vaDisplay);
|
||||||
~VASharingFunctions();
|
~VASharingFunctions() override;
|
||||||
|
|
||||||
uint32_t getId() const override {
|
uint32_t getId() const override {
|
||||||
return VASharingFunctions::sharingId;
|
return VASharingFunctions::sharingId;
|
||||||
|
|||||||
@@ -33,8 +33,14 @@ class ArrayRef {
|
|||||||
using const_iterator = const DataType *;
|
using const_iterator = const DataType *;
|
||||||
|
|
||||||
template <typename IteratorType>
|
template <typename IteratorType>
|
||||||
ArrayRef(IteratorType b, IteratorType e)
|
ArrayRef(IteratorType b, IteratorType e) {
|
||||||
: b(&*b), e(&*(e - 1) + 1) {
|
if (b != nullptr) {
|
||||||
|
this->b = &*b;
|
||||||
|
this->e = &*(e - 1) + 1;
|
||||||
|
} else {
|
||||||
|
this->b = nullptr;
|
||||||
|
this->e = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename IteratorType>
|
template <typename IteratorType>
|
||||||
@@ -52,9 +58,7 @@ class ArrayRef {
|
|||||||
: b(&array[0]), e(&array[Size]) {
|
: b(&array[0]), e(&array[Size]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayRef()
|
ArrayRef() = default;
|
||||||
: b(0), e(0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t size() const {
|
size_t size() const {
|
||||||
return e - b;
|
return e - b;
|
||||||
@@ -94,8 +98,8 @@ class ArrayRef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DataType *b;
|
DataType *b = nullptr;
|
||||||
DataType *e;
|
DataType *e = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete'
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-optin.cplusplus.VirtualCall'
|
||||||
# WarningsAsErrors: '.*'
|
# WarningsAsErrors: '.*'
|
||||||
HeaderFilterRegex: 'runtime/'
|
HeaderFilterRegex: 'runtime/'
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
|
|||||||
@@ -157,4 +157,6 @@ HWTEST_F(EnqueueDebugKernelSimpleTest, givenKernelFromProgramWithoutDebugEnabled
|
|||||||
|
|
||||||
size_t gws[] = {1, 1, 1};
|
size_t gws[] = {1, 1, 1};
|
||||||
mockCmdQ->enqueueKernel(kernel.get(), 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
mockCmdQ->enqueueKernel(kernel.get(), 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||||
|
|
||||||
|
::testing::Mock::VerifyAndClearExpectations(mockCmdQ.get());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-optin.performance.Padding,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-cplusplus.NewDeleteLeaks'
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-optin.performance.Padding,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-optin.cplusplus.VirtualCall'
|
||||||
|
|
||||||
|
|
||||||
# WarningsAsErrors: '.*'
|
# WarningsAsErrors: '.*'
|
||||||
HeaderFilterRegex: 'runtime/'
|
HeaderFilterRegex: 'runtime/'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Intel Corporation
|
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -81,8 +81,8 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull)
|
|||||||
EXPECT_TRUE(functions.wereFunctionsAssignedNull());
|
EXPECT_TRUE(functions.wereFunctionsAssignedNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
VAPrivFunc GetLibFunc(VADisplay vaDisplay, const char *func) {
|
void *GetLibFunc(VADisplay vaDisplay, const char *func) {
|
||||||
return (VAPrivFunc)0xdeadbeef;
|
return (void *)0xdeadbeef;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {
|
TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {
|
||||||
|
|||||||
Reference in New Issue
Block a user