From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- Semestr 4/ask/zadanie1/rozw.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 Semestr 4/ask/zadanie1/rozw.c (limited to 'Semestr 4/ask/zadanie1') diff --git a/Semestr 4/ask/zadanie1/rozw.c b/Semestr 4/ask/zadanie1/rozw.c deleted file mode 100644 index 068a268..0000000 --- a/Semestr 4/ask/zadanie1/rozw.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -const uint64_t C[] = { - 0x5555555555555555LL, - 0x3333333333333333LL, - 0x0f0f0f0f0f0f0f0fLL, - 0x00ff00ff00ff00ffLL, - 0x0000ffff0000ffffLL, - 0x00000000ffffffffLL -}; - -uint64_t revbits(uint64_t x) { - x = ((x & C[0]) << 1) | ((x >> 1) & C[0]); - x = ((x & C[1]) << 2) | ((x >> 2) & C[1]); - x = ((x & C[2]) << 4) | ((x >> 4) & C[2]); - x = ((x & C[3]) << 8) | ((x >> 8) & C[3]); - x = ((x & C[4]) << 16) | ((x >> 16) & C[4]); - x = ((x & C[5]) << 32) | ((x >> 32) & C[5]); - return x; -} \ No newline at end of file -- cgit v1.2.3