Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
66d17473
Commit
66d17473
authored
4 weeks ago
by
Georges Da Costa
Browse files
Options
Downloads
Patches
Plain Diff
Corrects some const labels
parent
e006cc4a
No related branches found
No related tags found
1 merge request
!12
Libmoj
Pipeline
#11681
failed
4 weeks ago
Stage: build-option
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nvidia_gpu.c
+7
-7
7 additions, 7 deletions
src/nvidia_gpu.c
with
7 additions
and
7 deletions
src/nvidia_gpu.c
+
7
−
7
View file @
66d17473
...
@@ -50,7 +50,7 @@ typedef struct Sensor Sensor;
...
@@ -50,7 +50,7 @@ typedef struct Sensor Sensor;
// -- Sensor interface
// -- Sensor interface
typedef
unsigned
int
(
Initializer
)
(
const
Device
*
,
void
**
);
typedef
unsigned
int
(
Initializer
)
(
const
Device
*
,
void
**
);
typedef
unsigned
int
(
Getter
)
(
uint64_t
*
,
const
Device
*
,
void
*
);
typedef
unsigned
int
(
Getter
)
(
uint64_t
*
,
const
Device
*
,
void
*
);
typedef
unsigned
int
(
Labeller
)
(
char
**
,
void
*
);
typedef
unsigned
int
(
Labeller
)
(
const
char
**
,
void
*
);
typedef
void
(
Cleaner
)
(
void
*
);
typedef
void
(
Cleaner
)
(
void
*
);
struct
ISensor
{
struct
ISensor
{
...
@@ -151,7 +151,7 @@ unsigned int get_clock_sensor(uint64_t *results, const Device *device, void *dat
...
@@ -151,7 +151,7 @@ unsigned int get_clock_sensor(uint64_t *results, const Device *device, void *dat
return
clock_data
->
count
;
return
clock_data
->
count
;
}
}
unsigned
int
label_clock_sensor
(
char
**
labels
,
void
*
data
)
unsigned
int
label_clock_sensor
(
const
char
**
labels
,
void
*
data
)
{
{
ClockData
*
clock_data
=
(
ClockData
*
)
data
;
ClockData
*
clock_data
=
(
ClockData
*
)
data
;
...
@@ -225,7 +225,7 @@ unsigned int get_memory_sensor(uint64_t *results, const Device *device, void *no
...
@@ -225,7 +225,7 @@ unsigned int get_memory_sensor(uint64_t *results, const Device *device, void *no
}
}
unsigned
int
label_memory_sensor
(
char
**
labels
,
void
*
data
)
unsigned
int
label_memory_sensor
(
const
char
**
labels
,
void
*
data
)
{
{
MemoryData
*
memory_data
=
(
MemoryData
*
)
data
;
MemoryData
*
memory_data
=
(
MemoryData
*
)
data
;
...
@@ -294,7 +294,7 @@ unsigned int get_utilization_sensor(uint64_t *results, const Device *device, voi
...
@@ -294,7 +294,7 @@ unsigned int get_utilization_sensor(uint64_t *results, const Device *device, voi
return
COUNT_UTILIZATION
;
return
COUNT_UTILIZATION
;
}
}
unsigned
int
label_utilization_sensor
(
char
**
labels
,
void
*
data
)
unsigned
int
label_utilization_sensor
(
const
char
**
labels
,
void
*
data
)
{
{
UtilizationData
*
utilization_data
=
(
UtilizationData
*
)
data
;
UtilizationData
*
utilization_data
=
(
UtilizationData
*
)
data
;
...
@@ -357,7 +357,7 @@ unsigned int get_power_sensor(uint64_t *results, const Device *device, void *non
...
@@ -357,7 +357,7 @@ unsigned int get_power_sensor(uint64_t *results, const Device *device, void *non
return
COUNT_POWER
;
return
COUNT_POWER
;
}
}
unsigned
int
label_power_sensor
(
char
**
labels
,
void
*
data
)
unsigned
int
label_power_sensor
(
const
char
**
labels
,
void
*
data
)
{
{
PowerData
*
power_data
=
(
PowerData
*
)
data
;
PowerData
*
power_data
=
(
PowerData
*
)
data
;
*
labels
=
power_data
->
label
;
*
labels
=
power_data
->
label
;
...
@@ -416,7 +416,7 @@ unsigned int get_temperature_sensor(uint64_t *results, const Device *device, voi
...
@@ -416,7 +416,7 @@ unsigned int get_temperature_sensor(uint64_t *results, const Device *device, voi
return
COUNT_TEMPERATURE
;
return
COUNT_TEMPERATURE
;
}
}
unsigned
int
label_temperature_sensor
(
char
**
labels
,
void
*
data
)
unsigned
int
label_temperature_sensor
(
const
char
**
labels
,
void
*
data
)
{
{
TemperatureData
*
temperature_data
=
(
TemperatureData
*
)
data
;
TemperatureData
*
temperature_data
=
(
TemperatureData
*
)
data
;
*
labels
=
temperature_data
->
label
;
*
labels
=
temperature_data
->
label
;
...
@@ -487,7 +487,7 @@ unsigned int get_device(uint64_t *results, Device *device)
...
@@ -487,7 +487,7 @@ unsigned int get_device(uint64_t *results, Device *device)
return
count
;
return
count
;
}
}
unsigned
int
label_device
(
char
**
labels
,
Device
*
device
)
unsigned
int
label_device
(
const
char
**
labels
,
Device
*
device
)
{
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
device
->
count
;
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
device
->
count
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment