view test/test_benchmark_simple.c @ 38:fd42f9b1b95e

docs: update copyright for 2025, update the README with more info I slightly edited vec.h however to use calloc directly rather than malloc + memset.
author Paper <paper@tflc.us>
date Sat, 26 Apr 2025 02:54:44 -0400
parents 4b5a557aa64f
children
line wrap: on
line source

#include <stdint.h>

extern void test_benchmark_sample_minmax_simple_impl(int16_t *smpl,
	uint32_t length, int32_t *pmin, int32_t *pmax)
{
	int32_t min = *pmin;
	int32_t max = *pmax;

	while (length--) {
		if (*smpl < min) min = *smpl;
		if (*smpl > max) max = *smpl;

		smpl++;
	}

	*pmin = min;
	*pmax = max;
}