Main Content

Stack size per GPU thread

Available stack size per thread on GPU

Since R2020b

Model Configuration Pane: Code Generation / GPU Code


The Stack size per GPU thread parameter specifies the stack limit per GPU thread.


  • This parameter requires a GPU Coder™ license.

  • To enable this parameter, select Generate GPU code on the Code Generation pane.


1024 (default) | integer

Specify the maximum stack limit per GPU thread as an integer value.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Type: integer
Value: any valid value
Default: 1024

Version History

Introduced in R2020b