8000 Format combined memory-handle and graphics-registration flags by RicheyWorks · Pull Request #57 · jcuda/jcuda · GitHub
[go: up one dir, main page]

Skip to content

Format combined memory-handle and graphics-registration flags - #57

Draft
RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:fix/combined-flag-strings
Draft

RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:fix/combined-flag-strings

Conversation

@RicheyWorks
@RicheyWorks RicheyWorks commented Nov 4, 2026 •
Copy link
Copy Markdown

Some flag stringFor methods still use single-value switches, so combinations are reported as INVALID. For example, CUmemAllocationHandleType.stringFor(6) loses the Win32 and Win32-KMT flag names, and cudaGraphicsRegisterFlags.stringFor(9) loses ReadOnly and TextureGather.

Related to #33. Decode combinations of the independent bits currently declared in these two classes, using space-separated names in declaration order. Keep the switches for existing exact-value strings (including zero and the existing handle sentinel), and retain the complete numeric INVALID diagnostic if any unknown bits occur. Document that formatting bits does not validate platform/resource/API compatibility.

This is a focused part of #33, not a claim that every flag formatter is now consistent. It does not add missing CUDA constants or change existing numeric values, JNI, resource registration or allocation behavior.

Verification:

mvn -f JCudaJava/pom.xml -Dtest=FlagCombinationStringTest test

CUDA flag definitions: driver types, runtime types.

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

Successfully merging this pull request may close these issues.

1 participant

0