2023-02-28 01:15:26 +00:00
|
|
|
// AUTOGENERATED COPYRIGHT HEADER START
|
|
|
|
// Copyright (C) 2020-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
|
|
// AUTOGENERATED COPYRIGHT HEADER END
|
2020-03-20 22:10:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
2022-08-29 10:29:44 +00:00
|
|
|
#include "nvidia-cuda.hpp"
|
|
|
|
|
|
|
|
#include "warning-disable.hpp"
|
2020-03-20 22:10:19 +00:00
|
|
|
#include <cstddef>
|
|
|
|
#include <memory>
|
2022-08-29 10:29:44 +00:00
|
|
|
#include "warning-enable.hpp"
|
2020-03-20 22:10:19 +00:00
|
|
|
|
2021-06-16 10:16:35 +00:00
|
|
|
namespace streamfx::nvidia::cuda {
|
2020-03-20 22:10:19 +00:00
|
|
|
class memory {
|
2021-06-16 10:16:35 +00:00
|
|
|
std::shared_ptr<::streamfx::nvidia::cuda::cuda> _cuda;
|
|
|
|
device_ptr_t _pointer;
|
|
|
|
size_t _size;
|
2020-03-20 22:10:19 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
~memory();
|
2020-11-08 05:47:47 +00:00
|
|
|
memory(size_t size);
|
2020-03-20 22:10:19 +00:00
|
|
|
|
2020-06-14 17:17:26 +00:00
|
|
|
device_ptr_t get();
|
2020-03-20 22:10:19 +00:00
|
|
|
|
|
|
|
std::size_t size();
|
|
|
|
};
|
2021-06-16 10:16:35 +00:00
|
|
|
} // namespace streamfx::nvidia::cuda
|