Skip to content

Commit

Permalink
mark symbols in rmm:: namespace with RMM_EXPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored and robertmaynard committed Aug 20, 2024
1 parent f05bd49 commit a727149
Show file tree
Hide file tree
Showing 50 changed files with 187 additions and 127 deletions.
6 changes: 4 additions & 2 deletions include/rmm/aligned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <cassert>
#include <cstddef>
#include <cstdint>

namespace rmm {
namespace RMM_EXPORT rmm {

/**
* @addtogroup utilities
Expand Down Expand Up @@ -123,4 +125,4 @@ static constexpr std::size_t CUDA_ALLOCATION_ALIGNMENT{256};

/** @} */ // end of group

} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/cuda_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

#include <rmm/aligned.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <cuda_runtime_api.h>

namespace rmm {
namespace RMM_EXPORT rmm {

struct cuda_device_id;
inline cuda_device_id get_current_cuda_device();
Expand Down Expand Up @@ -175,4 +176,4 @@ struct cuda_set_device_raii {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,14 +18,15 @@

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/detail/logging_assert.hpp>

#include <cuda_runtime_api.h>

#include <functional>
#include <memory>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -139,4 +140,4 @@ class cuda_stream {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream_pool.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,12 +19,13 @@
#include <rmm/cuda_stream.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <atomic>
#include <cstddef>
#include <vector>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -102,4 +103,4 @@ class cuda_stream_pool {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream_view.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
#pragma once

#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <cuda/stream_ref>
#include <cuda_runtime_api.h>
Expand All @@ -25,7 +26,7 @@
#include <cstddef>
#include <cstdint>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -201,4 +202,4 @@ inline std::ostream& operator<<(std::ostream& os, cuda_stream_view stream)
}

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 5 additions & 2 deletions include/rmm/detail/aligned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
#pragma once

#include <rmm/aligned.hpp>
#include <rmm/detail/export.hpp>

#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <new>

namespace rmm::detail {
namespace RMM_EXPORT rmm {
namespace detail {

/**
* @brief Allocates sufficient host-accessible memory to satisfy the requested size `bytes` with
Expand Down Expand Up @@ -112,4 +114,5 @@ void aligned_host_deallocate(void* ptr,

dealloc(original);
}
} // namespace rmm::detail
} // namespace detail
} // namespace RMM_EXPORT rmm
9 changes: 6 additions & 3 deletions include/rmm/detail/dynamic_load_runtime.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,7 @@
#pragma once

#include <rmm/cuda_device.hpp>
#include <rmm/detail/export.hpp>

#include <cuda_runtime_api.h>

Expand All @@ -24,7 +25,8 @@
#include <memory>
#include <optional>

namespace rmm::detail {
namespace RMM_EXPORT rmm {
namespace detail {

/**
* @brief `dynamic_load_runtime` loads the cuda runtime library at runtime
Expand Down Expand Up @@ -185,4 +187,5 @@ struct async_alloc {
#endif

#undef RMM_CUDART_API_WRAPPER
} // namespace rmm::detail
} // namespace detail
} // namespace RMM_EXPORT rmm
9 changes: 6 additions & 3 deletions include/rmm/detail/stack_trace.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
#pragma once

#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

// execinfo is a linux-only library, so stack traces will only be available on
// linux systems.
Expand All @@ -36,7 +37,8 @@
#include <vector>
#endif

namespace rmm::detail {
namespace RMM_EXPORT rmm {
namespace detail {

/**
* @brief stack_trace is a class that will capture a stack on instantiation for output later.
Expand Down Expand Up @@ -102,4 +104,5 @@ class stack_trace {
#endif // RMM_ENABLE_STACK_TRACES
};

} // namespace rmm::detail
} // namespace detail
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/device_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@
#include <rmm/cuda_device.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

Expand All @@ -29,7 +30,7 @@
#include <stdexcept>
#include <utility>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -479,4 +480,4 @@ class device_buffer {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/device_scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
#pragma once

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/device_uvector.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <type_traits>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -277,4 +278,4 @@ class device_scalar {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/device_uvector.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/exec_check_disable.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/device_buffer.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>
Expand All @@ -28,7 +29,7 @@
#include <cstddef>
#include <vector>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -565,4 +566,4 @@ class device_uvector {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/device_vector.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,13 @@

#pragma once

#include <rmm/detail/export.hpp>
#include <rmm/detail/thrust_namespace.h>
#include <rmm/mr/device/thrust_allocator_adaptor.hpp>

#include <thrust/device_vector.h>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup thrust_integrations
* @{
Expand All @@ -35,4 +36,4 @@ template <typename T>
using device_vector = thrust::device_vector<T, rmm::mr::thrust_allocator<T>>;

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/exec_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
#pragma once

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/detail/thrust_namespace.h>
#include <rmm/mr/device/thrust_allocator_adaptor.hpp>
#include <rmm/resource_ref.hpp>

#include <thrust/system/cuda/execution_policy.h>
#include <thrust/version.h>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup thrust_integrations
* @{
Expand Down Expand Up @@ -97,4 +98,4 @@ using exec_policy_nosync =
#endif

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
8 changes: 5 additions & 3 deletions include/rmm/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <spdlog/sinks/basic_file_sink.h>
Expand All @@ -25,7 +27,7 @@
#include <iostream>
#include <string>

namespace rmm {
namespace RMM_EXPORT rmm {

namespace detail {

Expand Down Expand Up @@ -125,7 +127,7 @@ inline spdlog::logger& logger()

//! @endcond

} // namespace rmm
} // namespace RMM_EXPORT rmm

// Doxygen doesn't like this because we're overloading something from fmt
//! @cond Doxygen_Suppress
Expand Down
Loading

0 comments on commit a727149

Please sign in to comment.