Skip to content
Merged
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ Packages required for using this pool and executing tests/benchmarks (not requir

### Memspaces (Linux-only)

> **Note**: The memspace, memtarget and mempolicy APIs are experimental and may change in future releases.

TODO: Add general information about memspaces.

#### Host all memspace
Expand Down
15 changes: 12 additions & 3 deletions docs/config/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,29 +136,38 @@ Memspace

TODO: Add general information about memspaces.

.. note::
The memspace APIs are experimental and may change in future releases.

Memspace
------------------------------------------
.. doxygenfile:: memspace.h
.. doxygenfile:: experimental/memspace.h
:sections: define enum typedef func

Mempolicy
==========================================

TODO: Add general information about mempolicies.

.. note::
The mempolicy APIs are experimental and may change in future releases.

Mempolicy
------------------------------------------
.. doxygenfile:: mempolicy.h
.. doxygenfile:: experimental/mempolicy.h
:sections: define enum typedef func

Memtarget
==========================================

TODO: Add general information about memtargets.

.. note::
The memtarget APIs are experimental and may change in future releases.

Memtarget
------------------------------------------
.. doxygenfile:: memtarget.h
.. doxygenfile:: experimental/memtarget.h
:sections: define enum typedef func

Inter-Process Communication
Expand Down
3 changes: 3 additions & 0 deletions docs/config/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ TODO
Memspace
==============================================================================

.. note::
Memspace examples rely on experimental APIs that may change in future releases.

You can find the full examples code in the `examples/memspace`_ directory
in the UMF repository.

Expand Down
6 changes: 3 additions & 3 deletions examples/memspace_hmat/memspace_hmat.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
*
* 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
*
*/

#include <umf/mempolicy.h>
#include <umf/memspace.h>
#include <umf/experimental/mempolicy.h>
#include <umf/experimental/memspace.h>

#include <numa.h>
#include <numaif.h>
Expand Down
4 changes: 2 additions & 2 deletions examples/memspace_numa/memspace_numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <stdio.h>
#include <string.h>

#include <umf/mempolicy.h>
#include <umf/memspace.h>
#include <umf/experimental/mempolicy.h>
#include <umf/experimental/memspace.h>

#include "examples_utils.h"

Expand Down
2 changes: 0 additions & 2 deletions include/umf.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <umf/base.h>
#include <umf/memory_pool.h>
#include <umf/memory_provider.h>
#include <umf/mempolicy.h>
#include <umf/memspace.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#define UMF_MEMSPACE_H 1

#include <umf/base.h>
#include <umf/experimental/mempolicy.h>
#include <umf/experimental/memtarget.h>
#include <umf/memory_pool.h>
#include <umf/memory_provider.h>
#include <umf/mempolicy.h>
#include <umf/memtarget.h>

#ifdef __cplusplus
extern "C" {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/mempolicy.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
*
* 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
*
*/
#include <umf/mempolicy.h>
#include <umf/experimental/mempolicy.h>

#include "base_alloc_global.h"
#include "mempolicy_internal.h"
Expand Down
4 changes: 2 additions & 2 deletions src/mempolicy_internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* 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
Expand All @@ -10,7 +10,7 @@
#ifndef UMF_MEMPOLICY_INTERNAL_H
#define UMF_MEMPOLICY_INTERNAL_H 1

#include <umf/mempolicy.h>
#include <umf/experimental/mempolicy.h>

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

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "base_alloc_global.h"
#include "memspace_internal.h"
Expand Down
4 changes: 2 additions & 2 deletions src/memspace_internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2023-2024 Intel Corporation
* Copyright (C) 2023-2025 Intel Corporation
*
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Expand All @@ -10,7 +10,7 @@
#ifndef UMF_MEMSPACE_INTERNAL_H
#define UMF_MEMSPACE_INTERNAL_H 1

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "base_alloc.h"
#include "memtarget_internal.h"
Expand Down
2 changes: 1 addition & 1 deletion src/memspaces/memspace_highest_bandwidth.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <stdlib.h>

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

// UMF_MEMSPACE_HIGHEST_BANDWIDTH requires HWLOC
// Additionally, it is currently unsupported on Win
Expand Down
4 changes: 2 additions & 2 deletions src/memspaces/memspace_highest_capacity.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* 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
Expand All @@ -11,7 +11,7 @@
#include <stdlib.h>

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

// UMF_MEMSPACE_HIGHEST_CAPACITY requires HWLOC
// Additionally, it is currently unsupported on Win
Expand Down
4 changes: 2 additions & 2 deletions src/memspaces/memspace_host_all.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* 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
Expand All @@ -11,7 +11,7 @@
#include <stdlib.h>

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

// UMF_MEMSPACE_HOST_ALL requires HWLOC
// Additionally, it is currently unsupported on Win
Expand Down
2 changes: 1 addition & 1 deletion src/memspaces/memspace_lowest_latency.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <stdlib.h>

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

// UMF_MEMSPACE_LOWEST_LATENCY requires HWLOC
// Additionally, it is currently unsupported on Win
Expand Down
2 changes: 1 addition & 1 deletion src/memspaces/memspace_numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <stdlib.h>

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

// umfMemspaceCreateFromNumaArray requires HWLOC
// Additionally, it is currently unsupported on Win
Expand Down
2 changes: 1 addition & 1 deletion src/memtarget_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define UMF_MEMTARGET_INTERNAL_H 1

#include <umf/base.h>
#include <umf/memtarget.h>
#include <umf/experimental/memtarget.h>
#ifdef __cplusplus
extern "C" {
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/memtarget_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#define UMF_MEMTARGET_OPS_H 1

#include <umf/base.h>
#include <umf/memspace.h>
#include <umf/memtarget.h>
#include <umf/experimental/memspace.h>
#include <umf/experimental/memtarget.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion src/memtargets/memtarget_numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define UMF_MEMTARGET_NUMA_H 1

#include <umf.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "../memtarget_internal.h"
#include "../memtarget_ops.h"
Expand Down
4 changes: 2 additions & 2 deletions test/memspaces/memspace_fixtures.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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

Expand All @@ -10,7 +10,7 @@
#include <numaif.h>
#include <thread>

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "base.hpp"
#include "memspace_helpers.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/memspaces/memspace_highest_bandwidth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "memspace_fixtures.hpp"
#include "memspace_helpers.hpp"
Expand Down
4 changes: 2 additions & 2 deletions test/memspaces/memspace_highest_capacity.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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

Expand All @@ -11,7 +11,7 @@

#include <numa.h>
#include <numaif.h>
#include <umf/memspace.h>
#include <umf/experimental/memspace.h>
#include <unordered_set>

using umf_test::test;
Expand Down
4 changes: 2 additions & 2 deletions test/memspaces/memspace_host_all.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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

Expand All @@ -7,7 +7,7 @@
#include <sys/mman.h>
#include <unordered_set>

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "memspace_fixtures.hpp"
#include "memspace_helpers.hpp"
Expand Down
4 changes: 2 additions & 2 deletions test/memspaces/memspace_lowest_latency.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// 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

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>

#include "memspace_fixtures.hpp"
#include "memspace_helpers.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/memspaces/memspace_numa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "memspace_internal.h"
#include "numa_helpers.hpp"

#include <umf/memspace.h>
#include <umf/experimental/memspace.h>
#include <umf/providers/provider_os_memory.h>

struct memspaceNumaTest : ::numaNodesTest {
Expand Down
4 changes: 2 additions & 2 deletions test/memspaces/memtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "memspace_helpers.hpp"

#include <umf/base.h>
#include <umf/memspace.h>
#include <umf/memtarget.h>
#include <umf/experimental/memspace.h>
#include <umf/experimental/memtarget.h>

using umf_test::test;

Expand Down
Loading