Parallel PopGen Package
spectrum.h File Reference

proto-API for building site frequency spectra (contains the titular namespace Spectrum) More...

Go to the source code of this file.

Classes

struct  Spectrum::SFS
 site frequency spectrum data structure (at the moment, functions only generate SFS for a single population at a single time point) More...
 

Namespaces

 Spectrum
 Namespace for site frequency spectrum data structure and functions. (in prototype-phase)
 

Functions

void Spectrum::population_frequency_histogram (SFS &mySFS, const GO_Fish::allele_trajectories &all_results, const int sample_index, const int population_index, int cuda_device=-1)
 create a frequency histogram of mutations at a single time point sample_index in a single population population_index store in mySFS
 
void Spectrum::site_frequency_spectrum (SFS &mySFS, const GO_Fish::allele_trajectories &all_results, const int sample_index, const int population_index, const int sample_size, int cuda_device=-1)
 create a single-population SFS of size sample_size from a single time point sample_index in a single population population_index from allele trajectory all_results, store in mySFS
 

Detailed Description

proto-API for building site frequency spectra (contains the titular namespace Spectrum)

spectrum.h is a prototype API for accelerating site frequency spectrum analysis on the GPU. Though functions Spectrum::population_frequency_histogram and Spectrum::site_frequency_spectrum are accelerated on the GPU, the CUDA specific code is not in the spectrum.h header file and thus, like go_fish_data_struct.h, spectrum.h can be included in either CUDA (*.cu) or standard C, C++ (*.c, *.cpp) source files.

Definition in file spectrum.h.