CUDA/Thrust implementation of the Brdz algorithm.
More...
|
typedef cheetah::Cuda | Architecture |
|
typedef panda::nvidia::DeviceCapability< 2, 0, panda::nvidia::giga/2 > | ArchitectureCapability |
|
typedef panda::PoolResource< Architecture > | ResourceType |
|
CUDA/Thrust implementation of the Brdz algorithm.
Definition at line 20 of file Brdz.cuh.
◆ Brdz()
ska::cheetah::brdz::cuda::Brdz::Brdz |
( |
Config const & |
impl_config, |
|
|
brdz::Config const & |
algo_config |
|
) |
| |
Create a new Brdz instance.
- Parameters
-
impl_config | The implementation configuration |
algo_config | The algorithm configuration |
◆ process()
template<typename T , typename Alloc >
Set to zero frequencies marked as birdies.
- Parameters
-
gpu | The gpu to process on |
input | The input frequency series |
- Template Parameters
-
T | The base value type of the complex frequency series |
Alloc | The allocator type of the frequency series |
Definition at line 41 of file Brdz.cu.
44 typedef typename data::ComplexTypeTraits<Architecture,T>::type ComplexType;
45 PANDA_LOG_DEBUG <<
"GPU ID: "<<gpu.device_id();
46 thrust::device_vector<unsigned> bins;
47 auto const& birdies = _algo_config.
birdies();
48 for (
auto& birdie: birdies)
50 std::size_t upper_bin = input.frequency_to_bin(birdie.frequency()+birdie.width() / 2.0);
51 std::size_t lower_bin = input.frequency_to_bin(birdie.frequency()-birdie.width() / 2.0);
52 upper_bin = std::min(upper_bin, input.size());
53 lower_bin = std::max(std::size_t(0), lower_bin);
54 for (std::size_t bin=lower_bin; bin<upper_bin; ++bin)
55 bins.push_back((
unsigned)bin);
57 ComplexType* ptr = thrust::raw_pointer_cast(input.data());
58 thrust::for_each(thrust::cuda::par, bins.begin(), bins.end(), detail::ZapFunctor<T>(ptr));
std::vector< data::Birdie > const & birdies() const
Get the birdie list.
The documentation for this class was generated from the following files: