Click here to Skip to main content
14,301,769 members
Rate this:
Please Sign up or sign in to vote.
See more:
how can i resolve this error?
error C2676: binary '[' : '__m128i' does not define this operator or a conversion to a type acceptable to the predefined operator
.h file
class bigyy
{
public:
bigyy();
.
.
.

protected:
__declspec(align(16))static const int pink[5][2];
__declspec(align(16))static const int orange[12];

protected:

__declspec(align(16))int _x;
__declspec(align(16))int _y;
};

.cpp file
#include <emmintrin.h>
const int bigyy::pink[5][2] =
{
{1,2},
{3,4},
{5,6 },
{ 7,8},
{ 9,10 }
};

const int bigyy::orange[12] =
{
0, 2, 2 ,
2, 1, 1 ,
0, 2, 2 ,
2, 1, 1
};

bigyy::bigyy()
{

_x = 1;
_y = _x % 6;

}
__m128i xo,temp;
.
.int p=orange[j]
.
.__m128i pink =_mm_cvtsi32_si128(pink[_y][p]);
.temp = _mm_mulhi_epi16(x0,pink[_y][p])//error C2676: binary '[' : '__m128i' does not define this operator or a conversion to a type acceptable to the predefined operator
Posted
Updated 22-Jul-10 21:18pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If __m128i is an integer type, you can explicitly cast it. If no conversion exists, you need to write some code to do the conversion you have in mind.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100