Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

68 lines
2.0 KiB
C++

/*
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
*
* SPDX-License-Identifier: MIT
*/
#include <iostream>
#include <vector>
#include <sstream>
#include <algorithm>
/*
Helper class used to store information in what file has HIP API been detected,
and on what line of code in that file.
*/
class FileOccurrence {
public:
std::string file_name;
int line_number;
FileOccurrence(std::string file_name, int line_number);
};
/*
Helper class used to store information in what file has the API Test Case been detected,
and on what line of code in that file.
*/
class TestCaseOccurrence : public FileOccurrence {
friend bool operator==(const TestCaseOccurrence& l_test, const TestCaseOccurrence& r_test);
friend bool operator<(const TestCaseOccurrence& l_test, const TestCaseOccurrence& r_test);
public:
std::string test_case_name;
TestCaseOccurrence(std::string test_case_name, std::string file_name, int line_number);
};
/*
Class used to store infromation about each HIP API. All information
is related to the API name, number of calls from test .cc files,
and its status of deprecation.
*/
class HipAPI {
friend bool operator==(const HipAPI& l_hip_api, const HipAPI& r_hip_api);
friend bool operator<(const HipAPI& l_hip_api, const HipAPI& r_hip_api);
public:
HipAPI(std::string api_name, bool deprecated_flag, std::string api_group_name,
std::string file_restriction = "");
std::string getName() const;
std::string getGroupName() const;
int getNumberOfCalls() const;
std::vector<TestCaseOccurrence> getTestCases() const;
void addFileOccurrence(FileOccurrence file_occurence);
void addTestCase(TestCaseOccurrence test_case);
bool isDeprecated() const;
std::string getBasicStatsXML() const;
std::string createHTMLReport() const;
std::string getFileRestriction() const;
std::vector<std::string> device_groups;
private:
std::string api_name;
std::string file_restriction;
bool deprecated;
std::string api_group_name;
std::vector<FileOccurrence> file_occurrences;
std::vector<TestCaseOccurrence> test_cases;
};