forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCLGPAImplementor.h
53 lines (37 loc) · 1.89 KB
/
CLGPAImplementor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//==============================================================================
// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
/// \author AMD Developer Tools Team
/// \file
/// \brief CL GPA Implementation declarations
//==============================================================================
#ifndef _CL_GPA_IMPLEMENTOR_H_
#define _CL_GPA_IMPLEMENTOR_H_
// Common
#include "TSingleton.h"
// GPA Common
#include "GPAImplementor.h"
/// Class for CL GPA Implementation
class CLGPAImplementor : public GPAImplementor, public TSingleton<CLGPAImplementor>
{
friend class TSingleton<CLGPAImplementor>; ///< friend declaration to allow access to the constructor
public:
/// Destructor
~CLGPAImplementor() = default;
/// \copydoc IGPAInterfaceTrait::GetAPIType()
GPA_API_Type GetAPIType() const override final;
/// \copydoc GPAImplementor::GetHwInfoFromAPI
bool GetHwInfoFromAPI(const GPAContextInfoPtr pContextInfo, GPA_HWInfo& hwInfo) const override final;
/// \copydoc GPAImplementor::VerifyAPIHwSupport
bool VerifyAPIHwSupport(const GPAContextInfoPtr pContextInfo, const GPA_HWInfo& hwInfo) const override final;
private:
/// Constructor
CLGPAImplementor() = default;
/// \copydoc GPAImplementor::OpenAPIContext
IGPAContext* OpenAPIContext(GPAContextInfoPtr pContextInfo, GPA_HWInfo& hwInfo, GPA_OpenContextFlags flags) override final;
/// \copydoc GPAImplementor::CloseAPIContext
bool CloseAPIContext(GPADeviceIdentifier pDeviceIdentifier, IGPAContext* pContext) override final;
/// \copydoc GPAImplementor::GetDeviceIdentifierFromContextInfo()
GPADeviceIdentifier GetDeviceIdentifierFromContextInfo(GPAContextInfoPtr pContextInfo) const override final;
bool m_initPerfCounterAMDExtension = false; ///< flag indicating if the CL extension function pointers have been initialized
};
#endif // _CL_GPA_IMPLEMENTOR_H_