Skip to content

Rename ctl internal header file #1418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/umf/providers/provider_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/

#ifndef UMF_PROVIDER_CUDA_H
#define UMF_PROVIDER_CUDA_H
#ifndef UMF_CUDA_PROVIDER_H
#define UMF_CUDA_PROVIDER_H

#include <umf/memory_provider_gpu.h>

Expand Down Expand Up @@ -67,4 +67,4 @@ const umf_memory_provider_ops_t *umfCUDAMemoryProviderOps(void);
}
#endif

#endif /* UMF_PROVIDER_CUDA_H */
#endif /* UMF_CUDA_PROVIDER_H */
6 changes: 3 additions & 3 deletions include/umf/providers/provider_level_zero.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/

#ifndef UMF_PROVIDER_LEVEL_ZERO_H
#define UMF_PROVIDER_LEVEL_ZERO_H
#ifndef UMF_LEVEL_ZERO_PROVIDER_H
#define UMF_LEVEL_ZERO_PROVIDER_H

#include <umf/memory_provider_gpu.h>

Expand Down Expand Up @@ -97,4 +97,4 @@ const umf_memory_provider_ops_t *umfLevelZeroMemoryProviderOps(void);
}
#endif

#endif /* UMF_PROVIDER_LEVEL_ZERO_H */
#endif /* UMF_LEVEL_ZERO_PROVIDER_H */
3 changes: 1 addition & 2 deletions src/ctl/ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* the library's internal state
*/

#include "ctl.h"

#include <ctype.h>
#include <limits.h>
#include <stdint.h>
Expand All @@ -27,6 +25,7 @@
#include <umf/base.h>

#include "base_alloc/base_alloc_global.h"
#include "ctl_internal.h"
#include "utils/utils_common.h"
#include "utlist.h"

Expand Down
8 changes: 4 additions & 4 deletions src/ctl/ctl.h → src/ctl/ctl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
/* Copyright 2016-2020, Intel Corporation */

/*
* ctl.h -- internal declaration of statistics and control related structures
* ctl_internal.h -- internal declaration of statistics and control related structures
*/

#ifndef UMF_CTL_H
#define UMF_CTL_H 1
#ifndef UMF_CTL_INTERNAL_H
#define UMF_CTL_INTERNAL_H 1

#include <errno.h>
#include <stddef.h>
Expand Down Expand Up @@ -245,4 +245,4 @@ umf_result_t ctl_query(struct ctl *ctl, void *ctx,
}
#endif

#endif
#endif /* UMF_CTL_INTERNAL_H */
2 changes: 1 addition & 1 deletion src/memory_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string.h>

#include "base_alloc_global.h"
#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"
#include "libumf.h"
#include "memory_pool_internal.h"
#include "memory_provider_internal.h"
Expand Down
2 changes: 1 addition & 1 deletion src/memory_provider_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <umf/memory_provider.h>

#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion src/pool/pool_disjoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <umf/memory_provider.h>

#include "base_alloc_global.h"
#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"
#include "pool_disjoint_internal.h"
#include "provider/provider_tracking.h"
#include "uthash/utlist.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pool/pool_scalable.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <umf/pools/pool_scalable.h>

#include "base_alloc_global.h"
#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"
#include "libumf.h"
#include "memory_pool_internal.h"
#include "pool_scalable_internal.h"
Expand Down
5 changes: 5 additions & 0 deletions src/pool/pool_scalable_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
*
*/

#ifndef UMF_POOL_SCALABLE_INTERNAL_H
#define UMF_POOL_SCALABLE_INTERNAL_H 1

void fini_tbb_global_state(void);

#endif /* UMF_POOL_SCALABLE_INTERNAL_H */
5 changes: 3 additions & 2 deletions src/provider/provider_ctl_stats_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extern "C" {
#endif

#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"
#include "utils/utils_assert.h"

static umf_result_t CTL_READ_HANDLER(peak_memory)(
Expand Down Expand Up @@ -106,4 +106,5 @@ static inline void provider_ctl_stats_free(CTL_PROVIDER_TYPE *provider,
#ifdef __cplusplus
}
#endif
#endif

#endif /* UMF_PROVIDER_CTL_STATS_IMPL_H */
3 changes: 2 additions & 1 deletion src/provider/provider_ctl_stats_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ typedef struct ctl_stats_t {
#ifdef __cplusplus
}
#endif
#endif

#endif /* UMF_PROVIDER_CTL_STATS_TYPE_H */
5 changes: 5 additions & 0 deletions src/provider/provider_cuda_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
*
*/

#ifndef UMF_CUDA_PROVIDER_INTERNAL_H
#define UMF_CUDA_PROVIDER_INTERNAL_H 1

void fini_cu_global_state(void);

#endif /* UMF_CUDA_PROVIDER_INTERNAL_H */
5 changes: 5 additions & 0 deletions src/provider/provider_level_zero_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
*
*/

#ifndef UMF_LEVEL_ZERO_PROVIDER_INTERNAL_H
#define UMF_LEVEL_ZERO_PROVIDER_INTERNAL_H 1

void fini_ze_global_state(void);

#endif /* UMF_LEVEL_ZERO_PROVIDER_INTERNAL_H */
2 changes: 1 addition & 1 deletion src/provider/provider_os_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <umf/memory_provider_ops.h>
#include <umf/providers/provider_os_memory.h>

#include "ctl/ctl.h"
#include "ctl/ctl_internal.h"
#include "utils_assert.h"
// OS Memory Provider requires HWLOC
#if defined(UMF_NO_HWLOC)
Expand Down
12 changes: 6 additions & 6 deletions test/ctl/ctl_debug.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
*
* Copyright (C) 2024 Intel Corporation
* Copyright (C) 2024-2025 Intel Corporation
*
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
*/

/*
* ctl_debug.h -- definitions for CTL test
* ctl_debug.h -- definitions for CTL tests
*/

#ifndef UMF_CTL_DEBUG_H
#define UMF_CTL_DEBUG_H 1
#ifndef UMF_TEST_CTL_DEBUG_H
#define UMF_TEST_CTL_DEBUG_H 1

#include "../src/ctl/ctl.h"
#include "ctl/ctl_internal.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -29,4 +29,4 @@ void deinitialize_debug_ctl(void);
}
#endif

#endif
#endif /* UMF_TEST_CTL_DEBUG_H */
2 changes: 1 addition & 1 deletion test/ctl/ctl_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

#include "../common/base.hpp"
#include "ctl/ctl.h"
#include "ctl/ctl_debug.h"
#include "ctl/ctl_internal.h"

using namespace umf_test;

Expand Down
Loading