-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPP Tensor Audio Support - MelFilterBank #332
Merged
kiritigowda
merged 210 commits into
ROCm:develop
from
r-abishek:ar/audio_support_8_mel_filter_bank
May 8, 2024
Merged
Changes from 205 commits
Commits
Show all changes
210 commits
Select commit
Hold shift + click to select a range
6627464
Initial commit - Non slient region detection
snehaa8 dcd9833
Initial commit - To Decibels
snehaa8 eb9e6eb
Intial commit - pre_emphasis_filter
HazarathKumarM 7983150
Intial commit - down_mixing
HazarathKumarM 568cefb
Intial commit - slice_audio
HazarathKumarM 2983867
Intial commit - mel_filter_bank
HazarathKumarM 3720c8f
Replace vectors with arrays
snehaa8 ed1e425
Cleanup
snehaa8 055fd59
Minor cleanup
snehaa8 0b93dc2
Optimize downmixing Kernel
snehaa8 38e5248
Remove unused variables in header file
snehaa8 9e213c5
Add axes parameter
snehaa8 f7f51c8
Replace Rpp64s with Rpp32s
snehaa8 6651256
Replace vectors with arrays
snehaa8 7f40dd8
Cleanup
snehaa8 676de7c
Optimize and precompute cutOff
snehaa8 46b8fb5
Fix buffer used
snehaa8 11fb3ab
Fix buffer used
snehaa8 8e05043
Additional Cleanup
snehaa8 5018e2a
Fix buffer allocation
snehaa8 41a6b31
Optimize post incrmeent operation
snehaa8 195ccfc
Optimize post increment operation
snehaa8 eefa6b2
Optimize post increment operation
snehaa8 79d9e6f
Update testsuite for Audio
snehaa8 5719db9
code cleanup
HazarathKumarM 4aad4d6
Add Readme file for Audio test suite
HazarathKumarM abf15d8
changes based on review comments
HazarathKumarM 71ef2f5
minor change
HazarathKumarM adad92b
Remove unittest folders and updated README.md
HazarathKumarM 8e01e0e
Remove unit tests
HazarathKumarM 69fba3e
minor change
HazarathKumarM a7b1b22
code cleanup
sampath1117 441bfac
added common header file for audio helper functions
sampath1117 c8803c2
Merge remote-tracking branch 'abishek_rpp/master' into sn/nsr_host_te…
sampath1117 e7169fe
removed unncessary audio wav files
sampath1117 11b4709
removed log file
sampath1117 d64bc7b
added doxygen support for audio
sampath1117 23ba5a5
Merge branch 'sn/nsr_host_tensor' into sn/to_decibels
sampath1117 337ccc1
added doxygen changes for to_decibels
sampath1117 d1b5b41
updated test suite support for to_decibels
sampath1117 223de61
minor change
sampath1117 bf0a4e0
added doxygen changes for preemphasis filter
sampath1117 f7d7589
Merge branch 'sn/to_decibels' into sn/pre_emphasis_filter
sampath1117 3626fc0
updated changes for preemphasis filter in test suite
sampath1117 512a79f
removed the usage of getMax function and used std::max_element
sampath1117 6a18957
modularized code in test suite
sampath1117 c413836
merge with latest changes
sampath1117 9f6b6d4
minor change
sampath1117 2247696
minor change
sampath1117 1ba334f
Merge branch 'sn/to_decibels' into sn/pre_emphasis_filter
sampath1117 527ed18
minor change
sampath1117 87b0138
Merge pull request #149 from snehaa8/sn/nsr_host_tensor
r-abishek 8e2975d
resolved codacy warnings
sampath1117 b9f8c12
Merge pull request #174 from snehaa8/sn/nsr_host_tensor
r-abishek b22bf93
Codacy fix - Remove unused cpuTime
r-abishek 4a5c357
CMakeLists - Version Update
kiritigowda 2c8a78b
CHANGELOG Updates
kiritigowda f07786a
merge with latest changes
sampath1117 54cfa29
resolved issue with file_system dependency in test suite
sampath1117 c8bd726
Doxygen changes
sampath1117 92f8ed7
Merge pull request #182 from sampath1117/sr/nsr_pr_changes
r-abishek c4d8f3d
Merge branch 'develop' into ar/audio_support_1_non_silent_region
r-abishek 1db1425
RPP RICAP Tensor for HOST and HIP (#213)
r-abishek 1d3e7ce
Documentation - Readme & changelog updates (#251)
LisaDelaney 13995ad
Merge branch 'ar/audio_support_1_non_silent_region' into sn/nsr_host_…
sampath1117 e85f581
added ctests for audio test suite for CI
sampath1117 296ed72
Merge pull request #187 from snehaa8/sn/nsr_host_tensor
r-abishek 0aec6e1
Cmake mods for ctest
r-abishek 3140717
HOST-only build error bugfix
r-abishek fe4ef51
Merge branch 'ar/audio_support_1_non_silent_region' into sn/nsr_host_…
sampath1117 0713890
added qa mode paramter to python audio script
sampath1117 e98a4e8
minor change
sampath1117 a1f7366
Documentation - Bump rocm-docs-core[api_reference] from 0.26.0 to 0.2…
dependabot[bot] 749a552
RPP Resize Mirror Normalize Bugfix (#252)
r-abishek 3f5aec6
Merge pull request #189 from snehaa8/sn/nsr_host_tensor
r-abishek 1b466bc
added example for MMS calculation in comments for better understanding
sampath1117 38119f3
Sphinx - updates (#257)
kiritigowda b98bb99
updated info used to for running audio test suite
sampath1117 3795f37
removed bitdepth variable from audio test suite
sampath1117 58e1ff5
added more information on computing NSR outputs in the example added
sampath1117 64c52cd
Merge pull request #191 from snehaa8/sn/nsr_host_tensor
r-abishek 6b2add5
Merge branch 'ar/audio_support_1_non_silent_region' of https://github…
r-abishek 7753fda
Merge branch 'ar/audio_support_2_to_decibels' into sn/to_decibels
r-abishek 072cc1e
Merge pull request #150 from snehaa8/sn/to_decibels
r-abishek e04371d
Merge branch 'ar/audio_support_1_non_silent_region' of https://github…
r-abishek 1f25169
Merge branch 'ar/audio_support_2_to_decibels' of https://github.com/r…
r-abishek 8e16be8
Merge branch 'ar/audio_support_3_pre_emphasis_filter' into sn/pre_emp…
r-abishek e261ce3
Merge pull request #151 from snehaa8/sn/pre_emphasis_filter
r-abishek 7bdd889
Merge branch 'ar/audio_support_1_non_silent_region' of https://github…
r-abishek f7d324f
Merge branch 'master' into sn/down_mixing
r-abishek 0630310
Merge branch 'ar/audio_support_2_to_decibels' of https://github.com/r…
r-abishek e0cac9f
Merge branch 'ar/audio_support_3_pre_emphasis_filter' of https://gith…
r-abishek d205055
Fix doxygen for decibels
snehaa8 f9c66a6
Merge pull request #195 from snehaa8/sn/to_decibels
r-abishek d0d0de1
move tensor_host_audio.cpp to host folder
SundarRajan28 415ee7b
Merge ar/audio_support_3_pre_emphasis_filter to sn/down_mixing
SundarRajan28 da528d3
Fix build errors and qa tests in Audio Test suite
snehaa8 ce13b82
Fix build errors and qa tests in Audio Test suite
snehaa8 bd81492
Merge remote-tracking branch 'abishek/ar/audio_support_4_down_mixing'…
snehaa8 a90e280
Merge pull request #197 from snehaa8/sn/to_decibels
r-abishek 5713d1d
Merge branch 'ar/audio_support_2_to_decibels' of https://github.com/r…
r-abishek 8ae8673
Merge branch 'ar/audio_support_3_pre_emphasis_filter' into sn/pre_emp…
r-abishek 9c8ac7f
Merge pull request #198 from snehaa8/sn/pre_emphasis_filter
r-abishek 1b943cf
Add reference output and test samples for downmix
snehaa8 31921cd
Merge branch 'sn/pre_emphasis_filter' into sn/down_mixing
snehaa8 21653af
Add down_mix in augmentation list and supported cases
snehaa8 5c4af0c
move Tensor_host_audio.cpp to host folder
snehaa8 af8cea3
Merge branch 'sn/down_mixing' into sn/slice_audio
snehaa8 47bfcd2
fix qa mismatches
snehaa8 7e073f1
move Tensor_host_audio.cpp to host folder
snehaa8 e500ffc
Merge slice_audio branch
snehaa8 efcab0d
fix qa mismatches
snehaa8 8227726
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek 783ee98
Remove auto-merge repeated funcs
r-abishek 900672a
Merge branch 'ar/audio_support_2_to_decibels' of https://github.com/r…
r-abishek 7e91a91
Improve clarity of header docs
r-abishek 3b03aad
Remove blank line
r-abishek 2be82b1
Improve clarity on header docs
r-abishek 934276a
Merge branch 'ar/audio_support_2_to_decibels' of https://github.com/r…
r-abishek 433d3f2
Merge latest changes from previousPR
snehaa8 be61650
Add Doxygen comments
snehaa8 c44b703
Merge latest changes from previousPR
snehaa8 6d72867
Add Doxygen comments
snehaa8 b1b1484
Merge latest changes from previousPR
snehaa8 5a93889
Add Doxygen comments
snehaa8 56dce62
minor change
snehaa8 7a2334b
merge with master
sampath1117 28a99be
converted golden outputs to binary file for downmixing
sampath1117 cb082d9
removed old golden output file for preemphasis and todecibels
sampath1117 e6a3ec3
modified info for downmixing as per new changes
sampath1117 d37fbe8
formatting changes
sampath1117 ee5eb16
Merge branch 'master' into sn/down_mixing
sampath1117 2d67580
Initial commit - Spectrogram
snehaa8 334b425
Add QA .bin reference file
snehaa8 a1f4213
License - updates to 2024 and consistency changes (#298)
r-abishek 7096c1d
Test - Update README.md for test_suite (#299)
r-abishek 2f9a611
Address internal review comments
snehaa8 05dc4fd
Modify cmakelist
snehaa8 fe1f475
Fix QA mismatch
snehaa8 07a5f66
Bump rocm-docs-core[api_reference] from 0.33.0 to 0.33.1 in /docs/sph…
dependabot[bot] a5e5679
Bump rocm-docs-core[api_reference] from 0.33.1 to 0.33.2 in /docs/sph…
dependabot[bot] e8aa6b2
Update doc codeowners (#303)
samjwu a921332
Documentation - Bump rocm-docs-core[api_reference] from 0.33.2 to 0.3…
dependabot[bot] 30bed4e
Test suite - upgrade 5 qa perf (#305)
kiritigowda 5c423ab
RPP Color Temperature on HOST and HIP (#271)
r-abishek df6e2c9
RPP Voxel 3D Tensor Add/Subtract scalar on HOST and HIP (#272)
r-abishek a4ed137
RPP Magnitude on HOST and HIP (#278)
r-abishek 1976cbf
Bump rocm-docs-core[api_reference] from 0.34.0 to 0.34.2 in /docs/sph…
dependabot[bot] ec8f2f0
RPP Tensor Audio Support - Down Mixing (#296)
r-abishek 29a5c82
RPP Voxel 3D Tensor Multiply scalar on HOST and HIP (#306)
r-abishek 98a3c82
Test Suite Bugfix (#307)
r-abishek 3d54baf
Merge branch 'develop' of https://github.com/r-abishek/rpp into sn/au…
r-abishek b9a011d
Merge pull request #223 from snehaa8/sn/audio_spectrogram
r-abishek 203ea70
Fix build errors on OCL backend
snehaa8 0bc1112
Merge pull request #238 from snehaa8/sn/audio_spectrogram
r-abishek d375376
Merge branch 'sn/mel_filter_bank' into sn/audio_spectrogram
snehaa8 b16d1dc
Merge pull request #3 from snehaa8/sn/audio_spectrogram
snehaa8 0a3e31b
Fix spectrogram
snehaa8 b821498
Cleanup
snehaa8 2f00442
Merge remote-tracking branch 'origin' into sn/audio_spectrogram_maste…
snehaa8 8ca76b1
Fix build error in tensor testsuite
snehaa8 e817bc1
Merge pull request #245 from snehaa8/sn/audio_spectrogram_master_merge
r-abishek 8ed0f65
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek c33af22
Bump rocm-docs-core[api_reference] from 0.35.0 to 0.35.1 in /docs/sph…
dependabot[bot] 7a4fbed
Merge branch 'master' into sn/mel_filter_bank
snehaa8 14f6334
Bump rocm-docs-core[api_reference] from 0.35.1 to 0.36.0 in /docs/sph…
dependabot[bot] 95c3272
Merge branch 'master' into develop
kiritigowda da7b501
Merge branch 'ROCm:master' into ar/audio_support_6_spectrogram
r-abishek ae5f7e9
Merge branch 'develop' of https://github.com/ROCm/rpp into ar/audio_s…
r-abishek ae7f053
Merge branch 'ar/audio_support_6_spectrogram' of https://github.com/r…
r-abishek 641f653
Docs - Bump rocm-docs-core[api_reference] from 0.36.0 to 0.37.0 in /d…
dependabot[bot] 5568573
Link cleanup (#326)
LisaDelaney 481d5d5
Change to camelCase for variable naming
snehaa8 2cd88f0
Cleanup testsuite for MFB
snehaa8 a6749ba
Update notes
LisaDelaney e126aec
Address review comments
snehaa8 8b28828
Revert change in runTests.py
snehaa8 82fae0b
Modified codes to use handle memory
snehaa8 a255906
Docs - Bump rocm-docs-core[api_reference] from 0.37.0 to 0.37.1 in /d…
dependabot[bot] 49efcb6
Merge pull request #251 from snehaa8/sn/spectrogram_address_review_co…
r-abishek d3df761
RPP Voxel Flip on HIP and HOST (#285)
r-abishek ebecb42
RPP Vignette Tensor on HOST and HIP (#311)
r-abishek 1e7df2a
Improve readability and cleanup
snehaa8 1a99bbf
Replace memset with fill for setting non zero integers
snehaa8 0a5ff5e
Merge pull request #242 from snehaa8/sn/mel_filter_bank
r-abishek fc1410b
Bump rocm-docs-core[api_reference] from 0.37.1 to 0.38.0 in /docs/sph…
dependabot[bot] 3d1903c
Move independent computes outside loop
snehaa8 d95baee
Use memset instead of manually filling values and move this outside loop
snehaa8 7ad7ab0
Replace c style cast with static cast
snehaa8 1ac9504
Revert "Use memset instead of manually filling values and move this o…
snehaa8 3ebd7c3
RPP Tensor Audio Support - Resample (#310)
r-abishek 76f31df
Docs - Missing input and output images for Doxygen (#331)
r-abishek b83f910
Scratch buffers rename for HOST and HIP (#324)
r-abishek ebeb131
Update CMakeLists.txt
kiritigowda 347d059
Merge pull request #262 from snehaa8/sn/spectrogram_address_review_co…
r-abishek cdad921
Merge branch 'develop' into ar/audio_support_6_spectrogram
r-abishek 3d9f0fd
Merge branch 'develop' into ar/audio_support_8_mel_filter_bank
r-abishek 3df1c99
Minor build fix
r-abishek 1147bfe
Update CMakeLists.txt
kiritigowda fb949e0
Merge branch 'develop' of https://github.com/GPUOpen-ProfessionalComp…
r-abishek 29b185f
Merge branch 'sn/spectrogram_address_review_comments' into sn/mel_fil…
snehaa8 86113ba
Introduce NFT and NTF layouts for audio kernels
snehaa8 1f1481d
Set layout for spectrogram and melfilterbank directly in testsuite
snehaa8 9651409
Remove extra blank line in testsuite
snehaa8 c902871
Merge pull request #264 from snehaa8/sn/mel_filter_bank
r-abishek 0cd8691
Merge branch 'develop' of https://github.com/ROCm/rpp into ar/audio_s…
r-abishek 1613aa6
Add parentheses
r-abishek 5718e73
Optimizations and cleanup
r-abishek 0ecb859
Merge branch 'develop' of https://github.com/ROCm/rpp into ar/audio_s…
r-abishek 90c6fdd
Merge branch 'develop' into ar/audio_support_8_mel_filter_bank
r-abishek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
|
||
This file is part of FFTS. | ||
|
||
Copyright (c) 2012, Anthony M. Blake | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of the organization nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL ANTHONY M. BLAKE BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
*/ | ||
|
||
#ifndef FFTS_H | ||
#define FFTS_H | ||
|
||
#if defined (_MSC_VER) && (_MSC_VER >= 1020) | ||
#pragma once | ||
#endif | ||
|
||
#include <stddef.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#if (defined(_WIN32) || defined(WIN32)) && defined(FFTS_SHARED) | ||
# ifdef FFTS_BUILD | ||
# define FFTS_API __declspec(dllexport) | ||
# else | ||
# define FFTS_API __declspec(dllimport) | ||
# endif | ||
#else | ||
# if (__GNUC__ >= 4) || defined(HAVE_GCC_VISIBILITY) | ||
# define FFTS_API __attribute__ ((visibility("default"))) | ||
# else | ||
# define FFTS_API | ||
# endif | ||
#endif | ||
|
||
/* The direction of the transform | ||
(i.e, the sign of the exponent in the transform.) | ||
*/ | ||
#define FFTS_FORWARD (-1) | ||
#define FFTS_BACKWARD (+1) | ||
|
||
struct _ffts_plan_t; | ||
typedef struct _ffts_plan_t ffts_plan_t; | ||
|
||
/* Complex data is stored in the interleaved format | ||
(i.e, the real and imaginary parts composing each | ||
element of complex data are stored adjacently in memory) | ||
|
||
The multi-dimensional arrays passed are expected to be | ||
stored as a single contiguous block in row-major order | ||
*/ | ||
FFTS_API ffts_plan_t* | ||
ffts_init_1d(size_t N, int sign); | ||
|
||
FFTS_API ffts_plan_t* | ||
ffts_init_2d(size_t N1, size_t N2, int sign); | ||
|
||
FFTS_API ffts_plan_t* | ||
ffts_init_nd(int rank, size_t *Ns, int sign); | ||
|
||
/* For real transforms, sign == FFTS_FORWARD implies a real-to-complex | ||
forwards tranform, and sign == FFTS_BACKWARD implies a complex-to-real | ||
backwards transform. | ||
|
||
The output of a real-to-complex transform is N/2+1 complex numbers, | ||
where the redundant outputs have been omitted. | ||
*/ | ||
FFTS_API ffts_plan_t* | ||
ffts_init_1d_real(size_t N, int sign); | ||
|
||
FFTS_API ffts_plan_t* | ||
ffts_init_2d_real(size_t N1, size_t N2, int sign); | ||
|
||
FFTS_API ffts_plan_t* | ||
ffts_init_nd_real(int rank, size_t *Ns, int sign); | ||
|
||
FFTS_API void | ||
ffts_execute(ffts_plan_t *p, const void *input, void *output); | ||
|
||
FFTS_API void | ||
ffts_free(ffts_plan_t *p); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* FFTS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
|
||
This file is part of FFTS -- The Fastest Fourier Transform in the South | ||
|
||
Copyright (c) 2012, Anthony M. Blake <amb@anthonix.com> | ||
Copyright (c) 2012, The University of Waikato | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of the organization nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL ANTHONY M. BLAKE BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
*/ | ||
|
||
#ifndef FFTS_ATTRIBUTES_H | ||
#define FFTS_ATTRIBUTES_H | ||
|
||
#if defined (_MSC_VER) && (_MSC_VER >= 1020) | ||
#pragma once | ||
#endif | ||
|
||
/* Macro definitions for various function/variable attributes */ | ||
#ifdef __GNUC__ | ||
#define GCC_VERSION_AT_LEAST(x,y) \ | ||
(__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y) | ||
#else | ||
#define GCC_VERSION_AT_LEAST(x,y) 0 | ||
#endif | ||
|
||
#ifdef __GNUC__ | ||
#define FFTS_ALIGN(x) __attribute__((aligned(x))) | ||
#elif defined(_MSC_VER) | ||
#define FFTS_ALIGN(x) __declspec(align(x)) | ||
#else | ||
#define FFTS_ALIGN(x) | ||
#endif | ||
|
||
#if GCC_VERSION_AT_LEAST(3,1) | ||
#define FFTS_ALWAYS_INLINE __attribute__((always_inline)) inline | ||
#elif defined(_MSC_VER) | ||
#define FFTS_ALWAYS_INLINE __forceinline | ||
#else | ||
#define FFTS_ALWAYS_INLINE inline | ||
#endif | ||
|
||
#if defined(_MSC_VER) | ||
#define FFTS_INLINE __inline | ||
#else | ||
#define FFTS_INLINE inline | ||
#endif | ||
|
||
#if defined(__GNUC__) | ||
#define FFTS_RESTRICT __restrict | ||
#elif defined(_MSC_VER) | ||
#define FFTS_RESTRICT __restrict | ||
#else | ||
#define FFTS_RESTRICT | ||
#endif | ||
|
||
#if GCC_VERSION_AT_LEAST(4,5) | ||
#define FFTS_ASSUME(cond) do { if (!(cond)) __builtin_unreachable(); } while (0) | ||
#elif defined(_MSC_VER) | ||
#define FFTS_ASSUME(cond) __assume(cond) | ||
#else | ||
#define FFTS_ASSUME(cond) | ||
#endif | ||
|
||
#if GCC_VERSION_AT_LEAST(4,7) | ||
#define FFTS_ASSUME_ALIGNED_16(x) __builtin_assume_aligned(x, 16) | ||
#else | ||
#define FFTS_ASSUME_ALIGNED_16(x) x | ||
#endif | ||
|
||
#if GCC_VERSION_AT_LEAST(4,7) | ||
#define FFTS_ASSUME_ALIGNED_32(x) __builtin_assume_aligned(x, 32) | ||
#else | ||
#define FFTS_ASSUME_ALIGNED_32(x) x | ||
#endif | ||
|
||
#if defined(__GNUC__) | ||
#define FFTS_LIKELY(cond) __builtin_expect(!!(cond), 1) | ||
#else | ||
#define FFTS_LIKELY(cond) cond | ||
#endif | ||
|
||
#if defined(__GNUC__) | ||
#define FFTS_UNLIKELY(cond) __builtin_expect(!!(cond), 0) | ||
#else | ||
#define FFTS_UNLIKELY(cond) cond | ||
#endif | ||
|
||
#endif /* FFTS_ATTRIBUTES_H */ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kiritigowda : Please verify including this as third party is OK from osrb requirements