Skip to content

Instantly share code, notes, and snippets.

@t-mat
t-mat / change_case_simd.c
Last active December 19, 2023 02:35 — forked from easyaspi314/change_case_simd.c
SIMD functions to apply toupper/tolower to each character in a string
// Created by easyaspi314. Released into the public domain.
// test:$ gcc -msse -DTEST change_case_simd.c && ./a.out
// > cl /EHsc /DTEST change_case_simd.c && .\change_case_simd.exe
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef DEMONSTRATE_BASIC_ALGORITHM
#include <stdint.h>