Skip to content

Instantly share code, notes, and snippets.

View WindArrayPerformanceTests
// Tests for post: http://chchrn.com/2021/09/19/vdsp_for_wind.html
// CHCHRN
import XCTest
import Accelerate
final class ArrayTransformer {
func floatArray(intValues: [UInt8],
min: Float,
@chchrn
chchrn / changeImportToAnglesForLib.sh
Last active Dec 3, 2020
changeImportToAnglesForLib.sh
View changeImportToAnglesForLib.sh
#!/bin/bash
# sample use:
thisScriptName=`basename "$0"`
if [[ $# -ne 3 ]]; then
echo "$thisScriptName <LIB PATH> <CODE PATH> <LIB NAME> \n"
echo "$thisScriptName ./myProject/src/Frameworks/ ./myProject/src Wlib \n"
exit 2
fi
View abstract_mapping.playground
import UIKit
// For my question about abstract mapping: https://stackoverflow.com/questions/57944086/how-to-use-a-variable-that-conforms-to-a-protocol-with-a-specific-associated-typ
// Abstract mapping
protocol Mapping {
associatedtype T
associatedtype R