1/*
2 * Copyright (C) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef GPU_H
17#define GPU_H
18#include <vector>
19#include "sp_profiler.h"
20namespace OHOS {
21namespace SmartPerf {
22class GPU : public SpProfiler {
23public:
24    std::map<std::string, std::string> ItemData() override;
25    static GPU &GetInstance()
26    {
27        static GPU instance;
28        return instance;
29    }
30    int GetGpuFreq();
31    float GetGpuLoad();
32    int32_t GetRkGpuFreq();
33    float GetRkGpuLoad();
34    void SetRkFlag();
35
36private:
37    GPU() {};
38    GPU(const GPU &);
39    GPU &operator = (const GPU &);
40    bool rkFlag = false;
41};
42}
43}
44#endif // GPU_H
45