Skip to content

Commit

Permalink
Update generated bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Klues <[email protected]>
  • Loading branch information
klueska committed Feb 16, 2021
1 parent 72a47dc commit 2fe76ab
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/nvml/cgo_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// WARNING: This file has automatically been generated on Wed, 03 Feb 2021 13:08:24 UTC.
// WARNING: This file has automatically been generated on Tue, 16 Feb 2021 14:53:33 UTC.
// Code generated by https://git.io/c-for-go. DO NOT EDIT.

#include "nvml.h"
Expand Down
2 changes: 1 addition & 1 deletion pkg/nvml/const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions pkg/nvml/const_gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package nvml

const (
SYSTEM_PROCESS_NAME_BUFFER_SIZE = 256
)
2 changes: 1 addition & 1 deletion pkg/nvml/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/nvml/nvml.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions pkg/nvml/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

package nvml

// #include <sys/prctl.h>
import "C"

// nvml.SystemGetDriverVersion()
func SystemGetDriverVersion() (string, Return) {
Version := make([]byte, SYSTEM_DRIVER_VERSION_BUFFER_SIZE)
Expand Down Expand Up @@ -47,8 +44,8 @@ func SystemGetCudaDriverVersion_v2() (int, Return) {

// nvml.SystemGetProcessName()
func SystemGetProcessName(Pid int) (string, Return) {
Name := make([]byte, C.PR_SET_NAME)
ret := nvmlSystemGetProcessName(uint32(Pid), &Name[0], C.PR_SET_NAME)
Name := make([]byte, SYSTEM_PROCESS_NAME_BUFFER_SIZE)
ret := nvmlSystemGetProcessName(uint32(Pid), &Name[0], SYSTEM_PROCESS_NAME_BUFFER_SIZE)
return string(Name[:clen(Name)]), ret
}

Expand Down

0 comments on commit 2fe76ab

Please sign in to comment.