城森 善行 / YJ Project Aug/28/2025 16:59

CPUのコア数に応じてマルチスレッド

キャラとマップのコリジョン判定を
CPUのコア数に応じてマルチスレッドで
処理するプログラムを作ってみました。

std::async と std::execution::par は挙動が怪しかったのですが
_beginthreadexなら使った事があったので
コア数ずつマルチスレッドで動作するようになりました。

が・・・何故かシングルスレッドの時より遅い(××;)
CPUの負荷は増えているのに・・・なんで???

これで色々な処理を高速化できると思ったのになぁ~(^^;)
 
 
ホームページ ( YJ Project )
https://yj-project.com/

YouTube ( YJゲーム開発チャンネル )
https://www.youtube.com/user/YoshiyukiJyomori

Recollection ( 3Dアクションゲーム TPS )
https://yj-project.com/reco/

YJ Studio ( 3Dグラフィック,エフェクト,マップ,リアルタイムレンダリングムービー作成アプリ )
https://yj-project.com/yj_studio/

YJライブラリ ( プログラム Visual Studio( Visual C++ ) DirectX )
https://yj-project.com/yj_lib/

BOOTH ( 無料や有料コンテンツをダウンロードできます。)
https://yj-project.booth.pm/

ユーザー登録 ( 送金された方はメールでお知らせ下さい )
https://yj-project.com/regist.html

ホームページの更新内容をLINEで受け取れます。
https://line.me/ti/g2/P1RMSAPt4C3IoShc5SZ3ueeMQ7cPIKmm9DNVPg?utm_source=invitation&utm_medium=link_copy&utm_campaign=default

YouTubeの投稿でも、ホームページの更新内容を受け取れます。
チャンネル登録して頂けると、更新時に通知(お知らせ)が届きます!
https://www.youtube.com/@YoshiyukiJyomori/community

If you liked this article, support the creator with a tip!

Sending tips requires user registration.Find details about tips here.

Search by Article Tags

Monthly Archive

Search Articles