gpu
GPU-accelerated computation functions for dose calculation.
- matRad_getCtFromGPU(ct, precision)
- matRad_getCtFromGPU transfers ct cube data from GPU to host.
Gathers ct.cubeHU and ct.cube cell arrays from GPU memory back to host memory. Optionally casts the data to the requested numeric precision after gathering.
call
ct = matRad_getCtFromGPU(ct) ct = matRad_getCtFromGPU(ct, precision)
- Input:
ct matRad ct struct with GPU arrays in cubeHU and/or cube
precision (optional) – ‘single’ or ‘double’. If empty or omitted, no cast is performed.
- Output:
ct matRad ct struct with host arrays in cubeHU and/or cube
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
- matRad_moveCtToGPU(ct, precision)
- matRad_moveCtToGPU transfers ct cube data to the GPU.
Moves ct.cubeHU and ct.cube cell arrays to GPU memory. Optionally casts the data to the requested numeric precision before uploading.
call
ct = matRad_moveCtToGPU(ct) ct = matRad_moveCtToGPU(ct, precision)
- Input:
ct matRad ct struct with host arrays in cubeHU and/or cube
precision (optional) – ‘single’ or ‘double’. If empty or omitted, no cast is performed.
- Output:
ct matRad ct struct with GPU arrays in cubeHU and/or cube
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
- matRad_moveDijToGPU(dij, precision)
- matRad_moveDijToGPU transfers dij dose influence matrix data to the GPU.
Moves the dose influence quantities (physicalDose, mAlphaDose, mSqrtBetaDose, mLETDose) to GPU memory. Optionally casts the data to the requested numeric precision before uploading.
call
dij = matRad_moveDijToGPU(dij) dij = matRad_moveDijToGPU(dij, precision)
- Input:
dij matRad dij struct with host arrays in dose influence fields
precision (optional) – ‘single’ or ‘double’. If empty or omitted, no cast is performed.
- Output:
dij matRad dij struct with GPU arrays in dose influence fields
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
- matRad_getCstFromGPU(cst, indexType)
- matRad_getCstFromGPU transfers cst dose influence data from GPU to host.
Gathers all cell arrays stored in column 4 of the cst (dose influence data) from GPU memory back to host memory. Optionally casts the data to the requested numeric precision after gathering.
call
cst = matRad_getCstFromGPU(cst) cst = matRad_getCstFromGPU(cst, precision)
- Input:
cst matRad cst cell array with GPU arrays in column 4
indexType (optional) – ‘int32’ or ‘uint64’. If empty or omitted, it will be cast to Matlab’s standard double.
- Output:
cst matRad cst cell array with host arrays in column 4
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
- matRad_getDijFromGPU(dij, precision)
- matRad_getDijFromGPU transfers dij dose influence matrix data from GPU to host.
Gathers the dose influence quantities (physicalDose, mAlphaDose, mSqrtBetaDose, mLETDose) from GPU memory back to host memory. Optionally casts the data to the requested numeric precision after gathering.
call
dij = matRad_getDijFromGPU(dij) dij = matRad_getDijFromGPU(dij, precision)
- Input:
dij matRad dij struct with GPU arrays in dose influence fields
precision (optional) – ‘single’ or ‘double’. If empty or omitted, no cast is performed.
- Output:
dij matRad dij struct with host arrays in dose influence fields
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
- matRad_moveCstToGPU(cst, indexType)
- matRad_moveCstToGPU transfers cst dose influence data to the GPU.
Moves all cell arrays stored in column 4 of the cst (dose influence data) to GPU memory. Optionally casts the data to the requested numeric precision before uploading.
call
cst = matRad_moveCstToGPU(cst) cst = matRad_moveCstToGPU(cst, precision)
- Input:
cst matRad cst cell array with host arrays in column 4
indexType (optional) – ‘int32’ or ‘uint64’. If empty or omitted, no cast is performed.
- Output:
cst matRad cst cell array with GPU arrays in column 4
- References
Copyright 2026 the matRad development team.
This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.