imate
C++/CUDA Reference
device_properties.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3
* SPDX-License-Identifier: BSD-3-Clause
4
* SPDX-FileType: SOURCE
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the license found in the LICENSE.txt file in the root
8
* directory of this source tree.
9
*/
10
11
#ifndef _CUDA_UTILITIES_DEVICE_PROPERTIES_H_
12
#define _CUDA_UTILITIES_DEVICE_PROPERTIES_H_
13
14
15
// =================
16
// Device Properties
17
// =================
18
22
23
struct
DeviceProperties
24
{
25
// Methods
26
DeviceProperties
();
27
~DeviceProperties
();
28
void
deallocate_members
();
29
void
set_num_devices
(
int
num_devices_);
30
31
// Data
32
int
num_devices
;
33
int
*
num_multiprocessors
;
34
int
*
num_threads_per_multiprocessor
;
35
};
36
37
#endif
// _CUDA_UTILITIES_DEVICE_PROPERTIES_H_
DeviceProperties
Properties of GPU devices.
Definition:
device_properties.h:24
DeviceProperties::num_devices
int num_devices
Definition:
device_properties.h:32
DeviceProperties::num_multiprocessors
int * num_multiprocessors
Definition:
device_properties.h:33
DeviceProperties::deallocate_members
void deallocate_members()
Deallocates the member data.
Definition:
device_properties.cu:55
DeviceProperties::~DeviceProperties
~DeviceProperties()
Destructor.
Definition:
device_properties.cu:42
DeviceProperties::DeviceProperties
DeviceProperties()
Constructor.
Definition:
device_properties.cu:27
DeviceProperties::num_threads_per_multiprocessor
int * num_threads_per_multiprocessor
Definition:
device_properties.h:34
DeviceProperties::set_num_devices
void set_num_devices(int num_devices_)
Sets the number of devices and allocates memory for member data with the size of devices.
Definition:
device_properties.cu:81
imate
_cuda_utilities
device_properties.h
Generated on Mon Jan 22 2024 00:04:57 for imate by
1.9.1