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
| /** | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2025 Colahall, LLC. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
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
| /** | |
| * Copyright (c) 2025 Ayan Shafqat <ayan@shafq.at> | |
| * | |
| * This program is free software: you can redistribute it and/or modify it | |
| * under the terms of the GNU General Public License as published by the Free | |
| * Software Foundation, either version 3 of the License, or (at your option) | |
| * any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, but WITHOUT | |
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
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
| /* | |
| * Copyright (C) 2025 Ayan Shafqat <ayan.x.shafqat@gmail.com> | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 3, or (at your option) | |
| * any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
| /* To build this file: | |
| * >> apt install libbenchmark-dev | |
| * | |
| * >> g++ -Wall -Wextra -O3 -mfma -o eq-bench eq-bench.cc \ | |
| * `pkg-config --cflags --libs benchmark` | |
| * >> ./eq-bench | |
| */ | |
| /* |
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
| __attribute__((section(".text"))) | |
| const char fun_impl[] = | |
| "\x8eGlsbVdoZEV3cGw=" | |
| "R2xhZEkgQ2FuIEg=" | |
| "\x8d\x04\x37\xc3" | |
| "ZWxwIHlvdSBvdXQ=" | |
| "VGhpcyBpcyBBU0N=" | |
| "SUkgQXJ0ISAgICA="; | |
| typedef int (*fun_t)(int, int); |
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
| #!/usr/bin/env python | |
| """A simple KCS decoder | |
| Copyright (c) 2023 Ayan Shafat <ayan.x.shafqat@gmail.com> | |
| """ | |
| from sys import argv, stdout | |
| import numpy as np | |
| import scipy.io.wavfile as wav |
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
| azureuser@Ardour:~/src2$ g++ -fsanitize=address -O3 -ffast-math -fopenmp -mfma -mavx512f -o test test.cc -lm && ./test 3333 4 | |
| compute_peak [def, AVX]: 5.000000e+00, 5.000000e+00 | |
| find_peaks [def, AVX]: (-5.000000e+00, 5.000000e+00) (-5.000000e+00, 5.000000e+00) | |
| apply_gain_to_bufer [Error]: 0.000000e+00 | |
| mix_buffers_no_gain [Error]: 0.000000e+00 | |
| mix_buffers_with_gain [Error]: 0.000000e+00 | |
| MICRO_BENCH: default_compute_peak | |
| Average time: 2.86104e-13 | |
| MICRO_BENCH: x86_avx_compute_peak | |
| Average time: 6.29599e-07 |
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
| /* | |
| * Public domain | |
| */ | |
| #include <iostream> | |
| #include <string> | |
| void fizzbuzz(int start, int stop) { | |
| int i = start; | |
| switch (i % 15) { |
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
| /** | |
| * Integer to Cardinal converter (unsigned) | |
| * | |
| * Copyright (C) 2021 Ayan Shafqat <ayan.x.shafqat@gmail.com> | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * |
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
| /** | |
| * Simple Malloc (smalloc) | |
| * Copyright (C) 2021 Ayan Shafqat <ayan.x.shafqat@gmail.com> | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, |
NewerOlder