This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* clzero の後にstoreするとmemsetよりはるかに悪くなる | |
* | |
* * clzeroのみ :30[GB/s] | |
* * clzero + ストア :3[GB/s] | |
* * memset :12.5[GB/s] | |
*/ | |
void *amd_clzero(void *dst, const void *src, size_t sz) | |
{ | |
size_t line_size = 64; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// x86 SIMD string to uppercase | |
// See http://stackoverflow.com/questions/735204/convert-a-string-in-c-to-upper-case | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <strings.h> // for ffs | |
#include <ctype.h> | |
#include <immintrin.h> |