gpt4 book ai didi

html - Google Prettify 削减了我的代码——需要修复

转载 作者:行者123 更新时间:2023-11-28 13:24:50 24 4
gpt4 key购买 nike

目前我的代码在 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;>

谢谢!

最佳答案

您的 HTML 无效。即使在 <pre> 里面元素,< , > , 和 &字符必须编码为 &lt; , &gt; , 和 &amp; , 分别。

关于html - Google Prettify 削减了我的代码——需要修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14188961/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com