Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900