basic_dsp 0.8.0

Digital signal processing based on real or complex vectors in time or frequency domain. Vectors come with basic arithmetic, convolution, Fourier transformation and interpolation operations. The vectors are optimized for sizes of a couple of thousand elements or more. The same operations are provdided for matrices. For complete matrix algebra this lib is intended to be used in combination with other matrix libs. Please refer to the documentation for more information about this.
Documentation
CARGO_CMD ?= cargo

RUST_VERSION=$(shell rustc --version)
RUST_NIGHTLY = $(findstring nightly,$(RUST_VERSION))

test:
ifeq ($(RUST_NIGHTLY), nightly)
	$(MAKE) run-all TASK="test"
	$(CARGO_CMD) clean
	$(CARGO_CMD) test --manifest-path vector/Cargo.toml --no-default-features --lib
	$(CARGO_CMD) clean
	$(CARGO_CMD) test --no-default-features --features std,use_sse2,matrix
	$(CARGO_CMD) clean
	$(CARGO_CMD) test --no-default-features --features std,use_avx2,matrix
else
	$(MAKE) run-all TASK="test"
endif
	
bench:
ifeq ($(RUST_NIGHTLY), nightly)
	$(CARGO_CMD) bench
else
	@echo "Bench requires Rust nigthly, skipping bench for $(RUST_VERSION)"
endif

clean:
	$(MAKE) run-all TASK="clean"

update:
	$(MAKE) run-all TASK="update"
    
build:
	$(MAKE) run-all TASK="build"
      
build_all: build
ifeq ($(RUST_NIGHTLY), nightly)
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml    
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std,use_sse2
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml    
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std,use_avx2
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml    
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features
else
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std
	$(CARGO_CMD) clean --manifest-path vector/Cargo.toml    
	$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features
endif
	
clippy:
ifeq ($(RUST_NIGHTLY), nightly)
	#$(CARGO_CMD) clean 
	#$(CARGO_CMD) clippy --no-default-features --features std,use_sse2,matrix
	@echo "Skipping clippy due to issue in nightly: component 'clippy' for target 'x86_64-unknown-linux-gnu' is unavailable for download"
else
	@echo "Skipping clippy for $(RUST_VERSION)"	
endif	
    
test_all: test
ifeq ($(RUST_NIGHTLY), nightly)
	$(CARGO_CMD) clean
	$(CARGO_CMD) test --manifest-path vector/Cargo.toml --no-default-features --lib
	$(CARGO_CMD) test --no-default-features --features std,use_sse2
	$(CARGO_CMD) test --no-default-features --features std,use_avx2
else
	$(CARGO_CMD) clean
	$(CARGO_CMD) test --manifest-path vector/Cargo.toml --no-default-features --lib
endif

run-all:
	$(CARGO_CMD) $(TASK) --no-default-features --features std,matrix
	$(CARGO_CMD) $(TASK) --manifest-path vector/Cargo.toml  --no-default-features --features std
	$(CARGO_CMD) $(TASK) --manifest-path matrix/Cargo.toml
	$(CARGO_CMD) $(TASK) --manifest-path interop/Cargo.toml