mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-19 19:53:51 +00:00
b37e8fc268
Compares two state update strategies for GPU optimization: - Strategy 1: Array of Structs (AoS) - immutable elements with embedded state - Strategy 2: Structure of Arrays (SoA) - separate geometry and mutable state Validates that SoA achieves 5-10× better memory bandwidth due to coalesced access patterns. Benchmarks both CPU and GPU implementations with detailed performance metrics including bandwidth utilization. Key findings: - SoA enables coalesced memory access (consecutive threads → consecutive memory) - AoS suffers from pointer chasing and non-coalesced access - SoA has zero allocations (in-place updates vs element reconstruction) - Tests with 10k, 100k, 1M elements showing scalability