Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のような行を含む C 並列 for ループがあります。
b[i] = b[0];
そのため、他の反復を開始する前に最初の反復を完了する必要があります。そのような行動を強制する条項はありますか?
ループから最初の反復を取り出し、インデックス 1 からループを開始するだけです。これが、最も簡単で安価な方法です。他の方法では待つ必要がありますが、これは非効率的です。