Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Accessing a matrix via boolean mask doesn't work

Closed
#301 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
julia
Domain
hpc

Research direction

Start by running the Julia MWE with OpenCL and pocl_jll to reproduce boolean-mask indexing failure, then compare it with the working CUDA behavior. Locate the OpenCL.jl path handling array indexing and add coverage for a Boolean OpenCL array mask; done means x12[x13] returns the selected elements without a BoundsError.

Written by the indexing model from the issue text.

Description

Julia upstream

MWE:

using OpenCL, pocl_jll
x12 = OpenCL.rand(10)
x13 = OpenCL.rand(Bool, 10)
x12[x13]

Fails with:

BoundsError: attempt to access 10-element OpenCL.CLArray{Float32, 1, OpenCL.cl.UnifiedDeviceMemory} at index [10-element OpenCL.CLArray{Bool, 1, OpenCL.cl.UnifiedDeviceMemory}]

Its CUDA alternative works as desired.

Dominant language
Julia
Stars
313
Forks
50
Avg merge
1d 9h
Merged PRs (30d)
43

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaGPU/OpenCL.jl

All issues in JuliaGPU/OpenCL.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.