Click here to Skip to main content
15,172,004 members

Comments by Joe Pizzi (Top 1 by date)

Joe Pizzi 5-Dec-16 22:26pm View
   
Your error message is from the line, const int idx = i. Since i is not a constant, the compiler cannot generate code for that line. The code you have in the first code block (the one that says, "I want to increase position.") looks right to me. What isn't working in that code?

The expression, "const int ndx" in the parameter list is telling you that the called function, _mm_extract_epi8, will not alter the value of the variable passed in for position number 2 of the call. It does not restrict the value that you give it.

As an aside, between your first and second examples, you changed the maximum iteration of the loop from 15 to 14. I don't know if you intended that. There is nothing in your question that indicates that was not a mistake.