dragonspit / parallelalgorithms Goto Github PK
View Code? Open in Web Editor NEWParallel C++ algorithms
License: MIT License
Parallel C++ algorithms
License: MIT License
I am using GCC 13.2 with oneTBB 2021.11.0 on Linux to build this code, which looks like it meets the requirements of having a C++ 20-compliant compiler and a current version of oneTBB. When I do this, however, I'm getting the following compilation error:
In file included from /ParallelAlgorithms/ParallelMergeSort.h:29,
from /ParallelAlgorithms/RadixSortLSD.h:11,
from /ParallelAlgorithms/RadixSortLsdBenchmark.cpp:11:
/ParallelAlgorithms/RadixSortLsdParallel.h: In instantiation of ‘void ParallelAlgorithms::_RadixSortLSD_StableUnsigned_PowerOf2RadixParallel_TwoPhase_DeRandomize(unsigned int*, unsigned int*, size_t, unsigned int, unsigned int, bool) [with long unsigned int PowerOfTwoRadix = 256; long unsigned int Log2ofPowerOfTwoRadix = 8; long int Threshold = 100; size_t = long unsigned int]’:
/ParallelAlgorithms/RadixSortLsdParallel.h:500:128: required from here
/ParallelAlgorithms/RadixSortLsdParallel.h:469:153: error: ‘_RadixSortLSD_StableUnsigned_PowerOf2Radix_PermuteDerandomized’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
469 | _RadixSortLSD_StableUnsigned_PowerOf2Radix_PermuteDerandomized< PowerOfTwoRadix, Log2ofPowerOfTwoRadix, Threshold, bufferDepth >(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
470 | _input_array, _output_array, 0, last, bitMask, shiftRightAmount, endOfBin, bufferIndex, bufferDerandomize);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ParallelAlgorithms/RadixSortLSD.h:135:13: note: ‘template<long unsigned int PowerOfTwoRadix, long unsigned int Log2ofPowerOfTwoRadix, long int Threshold, long unsigned int BufferDepth> void _RadixSortLSD_StableUnsigned_PowerOf2Radix_PermuteDerandomized(unsigned int*, unsigned int*, size_t, size_t, unsigned int, long unsigned int, size_t*, size_t*, unsigned int (*)[BufferDepth])’ declared here, later in the translation unit
135 | inline void _RadixSortLSD_StableUnsigned_PowerOf2Radix_PermuteDerandomized(unsigned* input_array, unsigned* output_array, size_t startIndex, size_t endIndex, unsigned bitMask, unsigned long shiftRightAmount,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This looks like an error related to the order of declaration and the point of instantiation for _RadixSortLSD_StableUnsigned_PowerOf2Radix_PermuteDerandomized
. However, I can't quite put my finger on this one as to what the issue is because the RadixSortLSD.h header is already included in RadixSortLsdParallel.h.
I wonder if it has something to do with RadixSortLsdBenchmark.cpp needing RadixSortLSD.h needing ParallelMergeSort.h needing RadixSortLsdParallel.h needing the RadixSortLSD.h header again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.