Skip to content

Instantly share code, notes, and snippets.

adam@hapkido ~/projects/rust-blas (main) $ cargo build
Compiling openblas-src v0.10.5
error: failed to run custom build command for `openblas-src v0.10.5`
Caused by:
process didn't exit successfully: `/Users/adam/projects/rust-blas/target/debug/build/openblas-src-a24cd0cb1e762156/build-script-build` (exit status: 101)
--- stdout
Running: `"make" "libs" "netlib" "shared" "BINARY=64" "YES_CBLAS=1" "YES_LAPACKE=1" "-j10"`
ar -ru ../libopenblas_neoversen2p-r0.3.20.a saxpy.o sswap.o scopy.o sscal.o sdot.o sdsdot.o dsdot.o sasum.o ssum.o snrm2.o smax.o samax.o ismax.o isamax.o smin.o samin.o ismin.o isamin.o srot.o srotg.o srotm.o srotmg.o saxpby.o cblas_isamax.o cblas_isamin.o cblas_sasum.o cblas_saxpy.o cblas_scopy.o cblas_sdot.o cblas_sdsdot.o cblas_dsdot.o cblas_srot.o cblas_srotg.o cblas_srotm.o cblas_srotmg.o cblas_sscal.o cblas_sswap.o cblas_snrm2.o cblas_saxpby.o cblas_ismin.o cblas_ismax.o cblas_ssum.o sgemv.o sger.o strsv.o strmv.o ssymv.o ssyr.o ssyr2.o sgbmv.o ssbmv.o sspmv.o sspr.o sspr2.o
@acgetchell
acgetchell / Delaunay.rs
Created December 8, 2022 07:45
Rust Delaunay triangulation
extern crate delaunator;
use delaunator::{Point, delaunay};
fn main() {
// Define a set of points
let points = vec![
Point { x: 0.0, y: 0.0 },
Point { x: 1.0, y: 0.0 },
Point { x: 1.0, y: 1.0 },
@acgetchell
acgetchell / Tetrahedron_soup
Created October 22, 2022 23:51
tetrahedron_soup_to_triangulation_3
====================[ Build | bistellar_tests | Debug ]=========================
"/Users/adam/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/222.4345.21/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/adam/projects/bistellar-flip/cmake-build-debug --target bistellar_tests -j 8
[1/2] Building CXX object tests/CMakeFiles/bistellar_tests.dir/delaunay_to_remeshing_test.cpp.o
FAILED: tests/CMakeFiles/bistellar_tests.dir/delaunay_to_remeshing_test.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DCGAL_TRIANGULATION_NO_ASSERTIONS -DCGAL_TRIANGULATION_NO_POSTCONDITIONS -DCGAL_USE_GMPXX=1 -DEIGEN_HAS_STD_RESULT_OF=0 -DTBB_USE_DEBUG -D_HAS_DEPRECATED_RESULT_OF=1 -I/Users/adam/projects/bistellar-flip/include -isystem /Users/adam/projects/bistellar-flip/vcpkg_installed/arm64-osx/include -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversio
-- Running vcpkg install
Detecting compiler hash for triplet arm64-osx...
All requested packages are currently installed.
Restored 0 packages from /Users/adam/.cache/vcpkg/archives in 11.38 us. Use --debug to see more details.
Total elapsed time: 2.412 s
The package cgal provides CMake targets:
find_package(CGAL CONFIG REQUIRED)
Deploying 'vcpkg Dockerfile: Dockerfile'...
Building image...
Preparing build context archive...
[==================================================>]102/102 files
Done
Sending build context to Docker daemon...
[==================================================>] 40.00kB
Done
@acgetchell
acgetchell / iterators.cpp
Last active February 15, 2020 21:01
Adding iterators to a class for use in ranged-for loops. See https://godbolt.org/z/4FLhuY
#include <iostream>
#include <string>
using namespace std;
template <typename T>
class Ring
{
private:
int m_size;
@acgetchell
acgetchell / errors.txt
Created October 8, 2019 04:31
vcpkg macOS Catalina build failure log
╭─adam@hapkido ~/vcpkg ‹master›
╰─$ ./bootstrap-vcpkg.sh 1 ↵
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
@acgetchell
acgetchell / pcg-cmake-errors
Created June 10, 2019 23:18
Cmake errors building with pcg package from Vcpkg
"/Users/adam/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-2/191.7479.33/CLion.app/Contents/bin/cmake/mac/bin/cmake" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake -G "CodeBlocks - Unix Makefiles" /Users/adam/pcg-test
CMake Error at /Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake:266 (_find_package):
By not providing "Findpcg.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pcg", but
CMake did not find one.
Could not find a package configuration file provided by "pcg" with any of
the following names:
pcgConfig.cmake
@acgetchell
acgetchell / CDT-CLI build
Created March 28, 2019 17:17
Command line build
┌─[adam][hapkido][±][develop {2} ✓][~/CDT-plusplus/tools]
└─▪ ./build.sh
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=RelWithDebInfo
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=10.0
@acgetchell
acgetchell / command_pattern.cpp
Last active March 21, 2019 07:16
Command Pattern
#include <iostream>
#include <string>
#include <memory>
#include <vector>
#include <functional>
struct A {
explicit A() : sum{15} {}
std::vector<int> data{1,2,3,4,5};
void update_sum() {