从__m128i转换为short或int [英] convertion from __m128i to short or int

查看:759
本文介绍了从__m128i转换为short或int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何转换:
__128i * p =(__ m128i *)x;

到short * p =(short *)x;
?

how do i convert from:
__128i*p=(__m128i*)x;

to short*p=(short*)x;
?

推荐答案

答案是仅使用强制转换运算符:

The answer is simply using the cast operator:

short* p = (short *)x;



但是,我认为阅读有关 MMX SSE 内在用法的这两篇文章可能对您很有用:

MMX编程简介 [ SSE编程简介 [



However, I think it could be useful for you to read these two articles about MMX and SSE intrinsics usage:

Introduction to MMX Programming[^]
Introduction to SSE Programming[^]


这篇关于从__m128i转换为short或int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆