# 11 Nested for loops in CUDA

**URL:** <https://forums.developer.nvidia.com/t/11-nested-for-loops-in-cuda/58176>\
**Category:** CUDA Programming and Performance\
**Created:** [February 13, 2018, 3:35pm UTC](https://forums.developer.nvidia.com/t/11-nested-for-loops-in-cuda/58176 "2018-02-13T15:35:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorsasser](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@taylorsasser](https://forums.developer.nvidia.com/u/taylorsasser)\
**Post date:** [February 13, 2018, 3:35pm UTC](https://forums.developer.nvidia.com/t/11-nested-for-loops-in-cuda/58176/1 "2018-02-13T15:35:59Z")

</div>

Hello, I am converting a JAVA simulation program to CUDA for a friend. He has 11 nested for loops, and I’m trying to get as much performance as possible from it. I’m am planning on using a grid-stride indexing system and I would appreciate any snippets and suggestions maximizing outputs. Currently, there is 1.3 quadrillion combinations I have to iterate through, testing each one, Each combination taking about ~64 bytes of local storage. I’m not to great at CUDA yet, so sorry if their is a obvious solution.
