Arrayfun/gpuArray CUDA kernel need to be able to remember previous steps

조회 수: 1 (최근 30일)
Anders
Anders 2024년 3월 25일
답변: Joss Knight 2024년 3월 29일
Background
  1. The problem can be separated into a large number of independent sub-problems.
  2. All sub-problems share the same matrix parameters.
  3. Each sub-problem needs to remember the indices itself has visited up to this point.
  4. The goal is to process the sub-problems in paralell on the GPU.
Array indexing and memory allocation is not supported in this context. Is this function possible to achieve?

답변 (1개)

Joss Knight
Joss Knight 2024년 3월 29일
This is a bit too vague to answer. Without indexing, how can each subproblem retrieve its subset of the data? If you just mean indexed assignment is not allowed then sure, you could write an arrayfun perhaps that solves some independent problem for a subset of an array, as long as all the operations are scalar and the output is scalar. Not if the subproblems are completely different algorithms though.
Anyway, sorry, but not enough information to help.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by