kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

commit 3d0b71a3e6e5a5f26527d4eb8d175ef9078aee00
parent b843817df61e303c16851bdbb00cc5f5a79826ab
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Tue, 19 Jul 2016 15:59:15 +0300

Split cpuid.hpp into two headers

Diffstat:
Minclude/kfr/dispatch/cpuid.hpp | 25-------------------------
Ainclude/kfr/dispatch/cpuid_auto.hpp | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 25 deletions(-)

diff --git a/include/kfr/dispatch/cpuid.hpp b/include/kfr/dispatch/cpuid.hpp @@ -277,29 +277,4 @@ cpu_t detect_cpu() return cpu_t::lowest; } } - -namespace internal -{ - -KFR_INLINE cpu_t& cpu_v() -{ - static cpu_t v1 = cpu_t::native; - return v1; -} - -KFR_INLINE char init_cpu_v() -{ - cpu_v() = detect_cpu<0>(); - return 0; -} - -KFR_INLINE char init_dummyvar() -{ - static char dummy = init_cpu_v(); - return dummy; -} - -static char dummyvar = init_dummyvar(); -} -KFR_INLINE cpu_t get_cpu() { return internal::cpu_v(); } } diff --git a/include/kfr/dispatch/cpuid_auto.hpp b/include/kfr/dispatch/cpuid_auto.hpp @@ -0,0 +1,53 @@ +/** + * Copyright (C) 2016 D Levin (http://www.kfrlib.com) + * This file is part of KFR + * + * KFR 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. + * + * KFR is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with KFR. + * + * If GPL is not suitable for your project, you must purchase a commercial license to use KFR. + * Buying a commercial license is mandatory as soon as you develop commercial activities without + * disclosing the source code of your own applications. + * See http://www.kfrlib.com for details. + */ +#pragma once + +#include "cpuid.hpp" + +namespace kfr +{ +namespace internal +{ + +KFR_INLINE cpu_t& cpu_v() +{ + static cpu_t v1 = cpu_t::native; + return v1; +} + +KFR_INLINE char init_cpu_v() +{ + cpu_v() = detect_cpu<0>(); + return 0; +} + +KFR_INLINE char init_dummyvar() +{ + static char dummy = init_cpu_v(); + return dummy; +} + +static char dummyvar = init_dummyvar(); +} +KFR_INLINE cpu_t get_cpu() { return internal::cpu_v(); } +}