Rendering & implementation · 9 / 10

Structure of Arrays / Data Locality

同種のデータをまとめて一括更新しやすくする。

Compare in motion

大量の群れ

Synchronized comparison
AReference
個体ごとにデータを並べる

個体ごとにデータを並べる

BStructure of Arrays / Data Locality100%
一括処理しやすいデータ配置になる

一括処理しやすいデータ配置になる

Loading demo…

Scrub to pause and inspect. At 0%, B matches A; at 100%, B shows the effect. The scene repeats every 8 seconds.

Look for: 同種データを連続して更新 → 群れが一斉に動く。

This model simplifies the technique to show its use case and effect. Operation counts describe the model; they are not performance measurements.

Read the storyboard

例: 大量の群れ

  1. 1. Start

    位置と速度がばらばら

  2. 2. Change

    同種データを連続して更新

  3. 3. Result

    群れが一斉に動く

一括処理しやすいデータ配置になる。時間変化を示す模式図です。実際の描画結果や処理速度を再現したものではありません。

How it works

  1. 1. Input

    個体ごとの位置・速度

  2. 2. Process

    項目ごとに配列を分ける

  3. 3. Result

    連続した一括アクセス

A schematic of Structure of Arrays / Data Locality. It shows the relationship between input, process, and result; exact values and rendering depend on the implementation.

Further reading

Unity ComputeShader ↗

A general reference for this subcategory.