René's URL Explorer Experiment


Title: [BUG] opencl-interop `get_device_type` always returns `DeviceType::ALL` · Issue #382 · arrayfire/arrayfire-rust · GitHub

Open Graph Title: [BUG] opencl-interop `get_device_type` always returns `DeviceType::ALL` · Issue #382 · arrayfire/arrayfire-rust

X Title: [BUG] opencl-interop `get_device_type` always returns `DeviceType::ALL` · Issue #382 · arrayfire/arrayfire-rust

Description: Description The get_device_type function transmutes the value -1 into DeviceType or returns DeviceType::ALL; however, the enum variant that corresponds to the value (-1i32 as u64) is DeviceType::ALL. This does not seem to be the intended...

Open Graph Description: Description The get_device_type function transmutes the value -1 into DeviceType or returns DeviceType::ALL; however, the enum variant that corresponds to the value (-1i32 as u64) is DeviceType::AL...

X Description: Description The get_device_type function transmutes the value -1 into DeviceType or returns DeviceType::ALL; however, the enum variant that corresponds to the value (-1i32 as u64) is DeviceType::AL...

Opengraph URL: https://github.com/arrayfire/arrayfire-rust/issues/382

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] opencl-interop `get_device_type` always returns `DeviceType::ALL`","articleBody":"Description\n===========\nThe `get_device_type` function transmutes the value `-1` into `DeviceType` or returns `DeviceType::ALL`; however, the enum variant that corresponds to the value `(-1i32 as u64)` [_is_](https://docs.rs/cl-sys/latest/src/cl_sys/cl_h.rs.html#216) `DeviceType::ALL`. This does not seem to be the intended behaviour.\n```rust\n///// Fetch Active ArrayFire device's type i.e. CPU/GPU/Accelerator etc.\npub fn get_device_type() -\u003e DeviceType {\n    let mut out: i32 = 0;\n    let err_val = unsafe { afcl_get_device_type(\u0026mut out as *mut c_int) };\n    handle_error_general(AfError::from(err_val));\n    match out {\n        -1 =\u003e unsafe { mem::transmute(out as u64) },\n        _ =\u003e DeviceType::ALL,\n    }\n}\n```\n\nThe value of `-1` corresponds to `AFCL_DEVICE_TYPE_UNKNOWN` in arrayfire, whilst `-1` corresponds to `CL_DEVICE_TYPE_ALL` in `cl-sys`","author":{"url":"https://github.com/nikhilr612","@type":"Person","name":"nikhilr612"},"datePublished":"2025-01-27T11:14:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/382/arrayfire-rust/issues/382"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c0d027bf-b890-b045-2a9a-4c9e3e19a5c3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB860:378B25:428D08:5F2960:696E4711
html-safe-nonce89b2dd68b672c1cf6b010058c6611b6938de1fab9ae7e2f880f9c2cc0b9db4b8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODYwOjM3OEIyNTo0MjhEMDg6NUYyOTYwOjY5NkU0NzExIiwidmlzaXRvcl9pZCI6IjU5NzU0NjM0MTk2MTE4OTEzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc709c0dab5aa4ed49a9441a89b3948ef08a77d60fe68b64450e5de75fcdccd58
hovercard-subject-tagissue:2812730081
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/arrayfire/arrayfire-rust/382/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d3eced5946aab16e0b1573c2a77f9ca06a842cd633af4ba6ad3631de06297585/arrayfire/arrayfire-rust/issues/382
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d3eced5946aab16e0b1573c2a77f9ca06a842cd633af4ba6ad3631de06297585/arrayfire/arrayfire-rust/issues/382
og:image:altDescription The get_device_type function transmutes the value -1 into DeviceType or returns DeviceType::ALL; however, the enum variant that corresponds to the value (-1i32 as u64) is DeviceType::AL...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenikhilr612
hostnamegithub.com
expected-hostnamegithub.com
None3d96554e55b469c47dbcd31f74dc86278872b170531e84c6ce7f3389673e01d1
turbo-cache-controlno-preview
go-importgithub.com/arrayfire/arrayfire-rust git https://github.com/arrayfire/arrayfire-rust.git
octolytics-dimension-user_id5395442
octolytics-dimension-user_loginarrayfire
octolytics-dimension-repository_id35817370
octolytics-dimension-repository_nwoarrayfire/arrayfire-rust
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id35817370
octolytics-dimension-repository_network_root_nwoarrayfire/arrayfire-rust
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseef576694863a4c791d0a5cc9d2b84384d4414bcd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Farrayfire-rust%2Fissues%2F382
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Farrayfire-rust%2Fissues%2F382
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=arrayfire%2Farrayfire-rust
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382
arrayfire https://patch-diff.githubusercontent.com/arrayfire
arrayfire-rusthttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Fork 58 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Star 827 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Code https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Issues 22 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues
Pull requests 2 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulls
Discussions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/discussions
Actions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/actions
Projects 1 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/security
Please reload this pagehttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382
Insights https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulse
Code https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Issues https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues
Pull requests https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulls
Discussions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/discussions
Actions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/actions
Projects https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/projects
Security https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/security
Insights https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/arrayfire-rust/issues/382
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/arrayfire-rust/issues/382
[BUG] opencl-interop get_device_type always returns DeviceType::ALLhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/382#top
Bughttps://github.com/arrayfire/arrayfire-rust/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/nikhilr612
https://github.com/nikhilr612
nikhilr612https://github.com/nikhilr612
on Jan 27, 2025https://github.com/arrayfire/arrayfire-rust/issues/382#issue-2812730081
ishttps://docs.rs/cl-sys/latest/src/cl_sys/cl_h.rs.html#216
Bughttps://github.com/arrayfire/arrayfire-rust/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.