- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
if a register has to be filled with data upto an arbitrary byte/word/dword position is it possible? for example:
if cnt = 0 or 1 or 2 or 3. how can the following be done
for (int i=0; i < cnt; i++)
{
Register = _mm_insert_epi32(Register, i);
Register1 = _mm_slli_si128(Register1, i);
}
Both are being dissallowed since i is required to be a constant value. Is there a workaround?
suppose at run time only two values are to be filled (cnt = 2).
Thanks
Deepak
コピーされたリンク
4 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Would that notnegate the optimization? Also is there a way to do a bit shift (not byet shift) on an m128i bit value.
Reg
Deepak
Reg
Deepak
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
My dear friend,
1) It is compiler who does optimisation, not you. For compiler switch() is as good optimizable as any other operator.
2) there's no way to bit shift whole register
1) It is compiler who does optimisation, not you. For compiler switch() is as good optimizable as any other operator.
2) there's no way to bit shift whole register
