1
目前我有一個是在被切斷的< for循環,因爲瀏覽器將其視爲一個標籤代碼,沒有任何人有一個修復這個?:谷歌美化切割我的代碼 - 修復需要
<pre class="prettyprint">
int count_simd(char *arr, int len, char key) {
int count = 0;
__m128i sixteenValues = _mm_setzero_si128();
__m128i result = _mm_setzero_si128();
__m128i keyV = _mm_set1_epi8(key);
for(int j=0; j < len/16*16; j+=16){
sixteenValues =_mm_load_si128((__m128i*)(arr+j));
result = _mm_sub_epi8(result, _mm_cmpeq_epi8(sixteenValues, keyV));
}
for(int i=len/16*16; i<len; i++){
if(arr[i]==key)
count++;
}
char A[16];
_mm_store_si128((__m128i*)A, result);
for(int k=0; k<16; k++){
count+=*(A+k);
}
return count;
}
</pre>
在渲染頁面的源代碼,一切都來了右邊,直到:
<len; i++){="" if(arr[i]="=key)" count++;="" }="" char="" a[16];="" _mm_store_si128((__m128i*)a,="" result);="" for(int="" k="0;" k<16;="" k++){="" count+="*(A+k);" return="" count;="" <="" pre=""><span class="pln">
</span></len;>
謝謝!
謝謝我完全忘了這個! – TheoretiCAL