Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check GetMemoryInfo_v2 support #95

Open
zxldev opened this issue Dec 19, 2023 · 1 comment
Open

check GetMemoryInfo_v2 support #95

zxldev opened this issue Dec 19, 2023 · 1 comment

Comments

@zxldev
Copy link

zxldev commented Dec 19, 2023

When get memory information, how can I determine whether to use GetMemoryInfo_v2 or GetMemoryInfo?

Can the lib.Lookup() method be made public? This way, I can use lib.Lookup("nvmlDeviceGetMemoryInfo_v2") to check if v2 is supported.

or, mark it in Init method as public var,

@elezar
Copy link
Member

elezar commented Jan 8, 2024

The choice between the two depends on whether you need the additional info that the v2 struct provides. Note that running GetLibrary().Lookup("nvmlDeviceGetMemoryInfo_v2") should do what you wanted.

Note that because the function signatures are not equivalent, we cannot alias GetMemoryInfo to the different versions based on availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants