int w = 474; int h = 477; int sum=0; BYTE *ptr; //byte array of image data. //... for (int j=0; j<h; j++) for (int i=0; i<w; i++) sum += ptr[w*j+i];
__m128i energy; __m128i current_1; // image data //... for (int j=0; j<h; j++) { for (int i=0; i<w; i+=8) { //... energy = _mm_add_epi8(energy,current_1); //... } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)