-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from segasai/parallel_safe
make at least q3c_ang2pix and few other functions parallel safe
- Loading branch information
Showing
4 changed files
with
1,112 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
comment = 'q3c sky indexing plugin' | ||
default_version = '2.0.0' | ||
default_version = '2.0.1' | ||
module_pathname = '$libdir/q3c' | ||
relocatable = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
\echo Use "CREATE EXTENSION q3c" to load this file. \quit | ||
|
||
-- make functions parallel safe | ||
|
||
CREATE OR REPLACE FUNCTION q3c_ang2ipix(double precision, double precision) | ||
RETURNS bigint | ||
AS 'MODULE_PATHNAME', 'pgq3c_ang2ipix' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_ang2ipix(ra real, decl real) | ||
RETURNS bigint | ||
AS 'MODULE_PATHNAME', 'pgq3c_ang2ipix_real' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_ipix2ang(ipix bigint) | ||
RETURNS double precision[] | ||
AS 'MODULE_PATHNAME', 'pgq3c_ipix2ang' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_pixarea(ipix bigint, depth int) | ||
RETURNS double precision | ||
AS 'MODULE_PATHNAME', 'pgq3c_pixarea' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_dist(ra1 double precision, dec1 double precision, | ||
ra2 double precision, dec2 double precision) | ||
RETURNS double precision | ||
AS 'MODULE_PATHNAME', 'pgq3c_dist' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_sindist(double precision, double precision, | ||
double precision, double precision) | ||
RETURNS double precision | ||
AS 'MODULE_PATHNAME', 'pgq3c_sindist' | ||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE COST 100; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_sindist_pm( | ||
ra1 double precision, dec1 double precision, | ||
pmra1 double precision, pmdec1 double precision, | ||
cosdec_flag integer, | ||
epoch1 double precision, ra2 double precision, dec2 double precision, | ||
epoch2 double precision) | ||
RETURNS double precision | ||
AS 'MODULE_PATHNAME', 'pgq3c_sindist_pm' | ||
LANGUAGE C IMMUTABLE PARALLEL SAFE COST 100; | ||
|
||
CREATE OR REPLACE FUNCTION q3c_dist_pm( | ||
ra1 double precision, dec1 double precision, | ||
pmra1 double precision, pmdec1 double precision, | ||
cosdec_flag int, | ||
epoch1 double precision, ra2 double precision, dec2 double precision, | ||
epoch2 double precision) | ||
RETURNS double precision | ||
AS 'MODULE_PATHNAME', 'pgq3c_dist_pm' | ||
LANGUAGE C IMMUTABLE PARALLEL SAFE COST 100; |
Oops, something went wrong.