Skip to content

Commit 05c91d6

Browse files
committed
Add comment
1 parent 0676638 commit 05c91d6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/schemes/structure/total_lagrangian_sph

src/schemes/structure/total_lagrangian_sph/rhs.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ function use_aligned_matrix_load(deformation_grad::AbstractGPUArray,
144144
return true
145145
end
146146

147-
# Don't use aligned vector loads on the CPU
147+
# Don't use aligned vector loads on the CPU. For large arrays, alignment to 32 bytes
148+
# (4 * Float64) is usually given, but it is not guaranteed, as Julia only guarantees
149+
# alignment to 16 bytes. However, the non-aligned `vload` used in `extract_smatrix` in 2D
150+
# has the same performance as the aligned `vloada` in `extract_smatrix_aligned` on the CPU.
148151
use_aligned_matrix_load(deformation_grad, pk1_rho2) = false
149152

150153
# Aligned vector load versions for deformation gradient and `pk1_rho2`.

0 commit comments

Comments
 (0)