LALPulsar  6.1.0.1-89842e6

Prototypes

WeaveCacheQueries * XLALWeaveCacheQueriesCreate (const LatticeTiling *semi_tiling, const SuperskyTransformData *semi_rssky_transf, const double dfreq, const UINT4 nqueries, const UINT4 nfreq_partitions)
 Create storage for a series of cache queries. More...
 
void XLALWeaveCacheQueriesDestroy (WeaveCacheQueries *queries)
 Destroy storage for a series of cache queries. More...
 
int XLALWeaveCacheQueriesInit (WeaveCacheQueries *queries, const UINT8 semi_index, const gsl_vector *semi_rssky, const INT4 semi_left, const INT4 semi_right, const UINT4 freq_partition_index)
 Initialise a series of cache queries. More...
 
int XLALWeaveCacheQuery (const WeaveCache *cache, WeaveCacheQueries *queries, const UINT4 query_index)
 Query a cache for the results nearest to a given coherent point. More...
 
int XLALWeaveCacheQueriesFinal (WeaveCacheQueries *queries, PulsarDopplerParams *semi_phys, UINT4 *semi_nfreqs)
 Finalise a series of cache queries. More...
 
int XLALWeaveCacheQueriesGetCounts (const WeaveCacheQueries *queries, UINT8 *coh_nres, UINT8 *coh_ntmpl, UINT8 *semi_ntmpl)
 Get number of computed coherent results, and number of coherent and semicoherent templates. More...
 
WeaveCache * XLALWeaveCacheCreate (const LatticeTiling *coh_tiling, const BOOLEAN interpolation, const SuperskyTransformData *coh_rssky_transf, const SuperskyTransformData *semi_rssky_transf, WeaveCohInput *coh_input, const UINT4 max_size, const BOOLEAN all_gc)
 Create a cache. More...
 
void XLALWeaveCacheDestroy (WeaveCache *cache)
 Destroy a cache. More...
 
int XLALWeaveGetCacheMeanMaxSize (REAL4 *cache_mean_max_size, const size_t ncache, WeaveCache *const *cache)
 Determine the mean maximum size obtained by caches. More...
 
int XLALWeaveCacheWriteInfo (FITSFile *file, const size_t ncache, WeaveCache *const *cache)
 Write various information from caches to a FITS file. More...
 
int XLALWeaveCacheExpire (WeaveCache *cache)
 Expire all items in the cache. More...
 
int XLALWeaveCacheClear (WeaveCache *cache)
 Clear all items in the cache from memory. More...
 
int XLALWeaveCacheRetrieve (WeaveCache *cache, const WeaveCacheQueries *queries, const UINT4 query_index, const WeaveCohResults **coh_res, UINT8 *coh_index, UINT4 *coh_offset, WeaveSearchTiming *tim)
 Retrieve coherent results for a given query, or compute new coherent results if not found. More...
 
Internal functions
static int cache_left_right_offsets (const UINT4 semi_nfreqs, const UINT4 nfreq_partitions, const UINT4 freq_partition_index, INT4 *left_offset, INT4 *right_offset)
 Compute left/right-most index offsets to select a given partition. More...
 
static int cache_max_semi_bbox_sample_dim0 (const WeaveCache *cache, const LatticeTiling *coh_tiling, const size_t i, gsl_vector *coh_bbox_sample, gsl_vector *semi_bbox_sample, double *max_semi_bbox_sample_dim0)
 Sample points on surface of coherent bounding box, convert to semicoherent supersky coordinates, and record maximum value of semicoherent coordinate in dimension 'dim0'. More...
 
static UINT8 cache_item_hash (const void *x)
 Hash cache items by generation and locator index. More...
 
static int cache_item_compare_by_coh_index (const void *x, const void *y)
 Compare cache items by generation, then locator index. More...
 
static int cache_item_compare_by_relevance (const void *x, const void *y)
 Compare cache items by generation, then relevance. More...
 
static void cache_item_destroy (void *x)
 Destroy a cache item. More...
 

Go to the source code of this file.

Data Structures

struct  cache_item
 Item stored in the cache. More...
 
struct  WeaveCacheQueries
 Container for a series of cache queries. More...
 
struct  WeaveCache
 Cache used to store coherent results. More...
 

Macros

#define COMPARE_BY(x, y)   do { if ( (x) < (y) ) return -1; if ( (x) > (y) ) return +1; } while(0)
 

Macro Definition Documentation

◆ COMPARE_BY

#define COMPARE_BY (   x,
  y 
)    do { if ( (x) < (y) ) return -1; if ( (x) > (y) ) return +1; } while(0)

Definition at line 32 of file CacheResults.c.

Function Documentation

◆ cache_left_right_offsets()

int cache_left_right_offsets ( const UINT4  semi_nfreqs,
const UINT4  nfreq_partitions,
const UINT4  freq_partition_index,
INT4 left_offset,
INT4 right_offset 
)
static

Compute left/right-most index offsets to select a given partition.

Definition at line 261 of file CacheResults.c.

◆ cache_max_semi_bbox_sample_dim0()

int cache_max_semi_bbox_sample_dim0 ( const WeaveCache *  cache,
const LatticeTiling *  coh_tiling,
const size_t  i,
gsl_vector *  coh_bbox_sample,
gsl_vector *  semi_bbox_sample,
double *  max_semi_bbox_sample_dim0 
)
static

Sample points on surface of coherent bounding box, convert to semicoherent supersky coordinates, and record maximum value of semicoherent coordinate in dimension 'dim0'.

Definition at line 216 of file CacheResults.c.

◆ cache_item_hash()

UINT8 cache_item_hash ( const void *  x)
static

Hash cache items by generation and locator index.

Definition at line 201 of file CacheResults.c.

◆ cache_item_compare_by_coh_index()

int cache_item_compare_by_coh_index ( const void *  x,
const void *  y 
)
static

Compare cache items by generation, then locator index.

Definition at line 186 of file CacheResults.c.

◆ cache_item_compare_by_relevance()

int cache_item_compare_by_relevance ( const void *  x,
const void *  y 
)
static

Compare cache items by generation, then relevance.

Definition at line 171 of file CacheResults.c.

◆ cache_item_destroy()

void cache_item_destroy ( void *  x)
static

Destroy a cache item.

Definition at line 157 of file CacheResults.c.

◆ XLALWeaveCacheQueriesCreate()

WeaveCacheQueries* XLALWeaveCacheQueriesCreate ( const LatticeTiling *  semi_tiling,
const SuperskyTransformData *  semi_rssky_transf,
const double  dfreq,
const UINT4  nqueries,
const UINT4  nfreq_partitions 
)

Create storage for a series of cache queries.

Definition at line 305 of file CacheResults.c.

◆ XLALWeaveCacheQueriesDestroy()

void XLALWeaveCacheQueriesDestroy ( WeaveCacheQueries *  queries)

Destroy storage for a series of cache queries.

Definition at line 383 of file CacheResults.c.

◆ XLALWeaveCacheQueriesInit()

int XLALWeaveCacheQueriesInit ( WeaveCacheQueries *  queries,
const UINT8  semi_index,
const gsl_vector *  semi_rssky,
const INT4  semi_left,
const INT4  semi_right,
const UINT4  freq_partition_index 
)

Initialise a series of cache queries.

Definition at line 404 of file CacheResults.c.

◆ XLALWeaveCacheQuery()

int XLALWeaveCacheQuery ( const WeaveCache *  cache,
WeaveCacheQueries *  queries,
const UINT4  query_index 
)

Query a cache for the results nearest to a given coherent point.

Definition at line 449 of file CacheResults.c.

◆ XLALWeaveCacheQueriesFinal()

int XLALWeaveCacheQueriesFinal ( WeaveCacheQueries *  queries,
PulsarDopplerParams semi_phys,
UINT4 semi_nfreqs 
)

Finalise a series of cache queries.

Definition at line 515 of file CacheResults.c.

◆ XLALWeaveCacheQueriesGetCounts()

int XLALWeaveCacheQueriesGetCounts ( const WeaveCacheQueries *  queries,
UINT8 coh_nres,
UINT8 coh_ntmpl,
UINT8 semi_ntmpl 
)

Get number of computed coherent results, and number of coherent and semicoherent templates.

Definition at line 580 of file CacheResults.c.

◆ XLALWeaveCacheCreate()

WeaveCache* XLALWeaveCacheCreate ( const LatticeTiling *  coh_tiling,
const BOOLEAN  interpolation,
const SuperskyTransformData *  coh_rssky_transf,
const SuperskyTransformData *  semi_rssky_transf,
WeaveCohInput *  coh_input,
const UINT4  max_size,
const BOOLEAN  all_gc 
)

Create a cache.

Definition at line 616 of file CacheResults.c.

◆ XLALWeaveCacheDestroy()

void XLALWeaveCacheDestroy ( WeaveCache *  cache)

Destroy a cache.

Definition at line 766 of file CacheResults.c.

◆ XLALWeaveGetCacheMeanMaxSize()

int XLALWeaveGetCacheMeanMaxSize ( REAL4 cache_mean_max_size,
const size_t  ncache,
WeaveCache *const cache 
)

Determine the mean maximum size obtained by caches.

Definition at line 783 of file CacheResults.c.

◆ XLALWeaveCacheWriteInfo()

int XLALWeaveCacheWriteInfo ( FITSFile file,
const size_t  ncache,
WeaveCache *const cache 
)

Write various information from caches to a FITS file.

Definition at line 809 of file CacheResults.c.

◆ XLALWeaveCacheExpire()

int XLALWeaveCacheExpire ( WeaveCache *  cache)

Expire all items in the cache.

Definition at line 833 of file CacheResults.c.

◆ XLALWeaveCacheClear()

int XLALWeaveCacheClear ( WeaveCache *  cache)

Clear all items in the cache from memory.

Definition at line 852 of file CacheResults.c.

◆ XLALWeaveCacheRetrieve()

int XLALWeaveCacheRetrieve ( WeaveCache *  cache,
const WeaveCacheQueries *  queries,
const UINT4  query_index,
const WeaveCohResults **  coh_res,
UINT8 coh_index,
UINT4 coh_offset,
WeaveSearchTiming *  tim 
)

Retrieve coherent results for a given query, or compute new coherent results if not found.

Definition at line 874 of file CacheResults.c.