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.
最近の CPU には、(たとえば) 4 つshort(16 ビット) の値を一度に追加し、それを 1 つのint値 (32 ビット) に格納する命令はありますか? これらの 4 つの値は連続して配置され、任意のブロック サイズに配置できます。
short
int
要件AFAIKに正確に一致するものはありません。x86(SSE)の場合、最も近いのはおそらくpmaddwd(_mm_madd_epi16())(乗数は1)です。
_mm_madd_epi16()