Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
CacheResults.h
Go to the documentation of this file.
1//
2// Copyright (C) 2016, 2017 Karl Wette
3//
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation; either version 2 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with with program; see the file COPYING. If not, write to the
16// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17// MA 02110-1301 USA
18//
19
20#ifndef _CACHE_RESULTS_H
21#define _CACHE_RESULTS_H
22
23///
24/// \file
25/// \ingroup lalpulsar_bin_Weave
26/// \brief Module which caches computed coherent results
27///
28
29#include "Weave.h"
30#include "ComputeResults.h"
31#include "SearchTiming.h"
32
33#include <lal/LatticeTiling.h>
34#include <lal/SuperskyMetrics.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40WeaveCacheQueries *XLALWeaveCacheQueriesCreate(
41 const LatticeTiling *semi_tiling,
42 const SuperskyTransformData *semi_rssky_transf,
43 const double dfreq,
44 const UINT4 nqueries,
45 const UINT4 nfreq_partitions
46);
48 WeaveCacheQueries *queries
49);
51 WeaveCacheQueries *queries,
52 const UINT8 semi_index,
53 const gsl_vector *semi_rssky,
54 const INT4 semi_left,
55 const INT4 semi_right,
56 const UINT4 freq_partition_index
57);
59 const WeaveCache *cache,
60 WeaveCacheQueries *queries,
61 const UINT4 query_index
62);
64 WeaveCacheQueries *queries,
65 PulsarDopplerParams *semi_phys,
66 UINT4 *semi_nfreqs
67);
69 const WeaveCacheQueries *queries,
70 UINT8 *coh_nres,
71 UINT8 *coh_ntmpl,
72 UINT8 *semi_ntmpl
73);
74WeaveCache *XLALWeaveCacheCreate(
75 const LatticeTiling *coh_tiling,
76 const BOOLEAN interpolation,
77 const SuperskyTransformData *coh_rssky_transf,
78 const SuperskyTransformData *semi_rssky_transf,
79 WeaveCohInput *coh_input,
80 const UINT4 max_size,
81 const BOOLEAN all_gc
82);
84 WeaveCache *cache
85);
87 REAL4 *cache_mean_max_size,
88 const size_t ncache,
89 WeaveCache *const *cache
90);
93 const size_t ncache,
94 WeaveCache *const *cache
95);
97 WeaveCache *cache
98);
100 WeaveCache *cache
101);
103 WeaveCache *cache,
104 const WeaveCacheQueries *queries,
105 const UINT4 query_index,
106 const WeaveCohResults **coh_res,
107 UINT8 *coh_index,
108 UINT4 *coh_offset,
109 WeaveSearchTiming *tim
110);
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif // _CACHE_RESULTS_H
117
118// Local Variables:
119// c-file-style: "linux"
120// c-basic-offset: 2
121// End:
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: CacheResults.c:616
void XLALWeaveCacheQueriesDestroy(WeaveCacheQueries *queries)
Destroy storage for a series of cache queries.
Definition: CacheResults.c:383
int XLALWeaveCacheQuery(const WeaveCache *cache, WeaveCacheQueries *queries, const UINT4 query_index)
Query a cache for the results nearest to a given coherent point.
Definition: CacheResults.c:449
int XLALWeaveCacheQueriesFinal(WeaveCacheQueries *queries, PulsarDopplerParams *semi_phys, UINT4 *semi_nfreqs)
Finalise a series of cache queries.
Definition: CacheResults.c:515
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: CacheResults.c:404
int XLALWeaveCacheExpire(WeaveCache *cache)
Expire all items in the cache.
Definition: CacheResults.c:833
int XLALWeaveGetCacheMeanMaxSize(REAL4 *cache_mean_max_size, const size_t ncache, WeaveCache *const *cache)
Determine the mean maximum size obtained by caches.
Definition: CacheResults.c:783
void XLALWeaveCacheDestroy(WeaveCache *cache)
Destroy a cache.
Definition: CacheResults.c:766
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: CacheResults.c:874
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: CacheResults.c:305
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: CacheResults.c:580
int XLALWeaveCacheClear(WeaveCache *cache)
Clear all items in the cache from memory.
Definition: CacheResults.c:852
int XLALWeaveCacheWriteInfo(FITSFile *file, const size_t ncache, WeaveCache *const *cache)
Write various information from caches to a FITS file.
Definition: CacheResults.c:809
Module which computes coherent and semicoherent results.
Module which collects search timings and builds a timing model.
struct tagFITSFile FITSFile
Representation of a FITS file.
Definition: FITSFileIO.h:54
unsigned char BOOLEAN
uint64_t UINT8
uint32_t UINT4
int32_t INT4
float REAL4
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.