IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 21 years ago

Last modified 21 years ago

#269 closed defect (fixed)

psMatrixLUD perm parameter needs to be psVector**

Reported by: robert.desonia@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc:

Description

In the SDRS specifications (section 4.8 in SDRS v 10), it is stated "The GSL
routines require the use of a permutation vector, perm. The vector shall be
created psMatrixLUD, and the user need only pass this to psMatrixLUSolve before
destroying it in the standard manner."

Well, that infers that psMatrixLUD need a allocate the psVector and pass it
back, but the prototype in the same SDRS section is:

psImage* psMatrixLUD(psImage* out, psVector* perm, const psImage* in);

and this does not allow a newly allocated psVector* to be passed back. I
suggest changing the "psVector* perm" parameter to "psVector perm" instead.

-rdd

Change History (3)

comment:1 by Paul Price, 21 years ago

Resolution: fixed
Status: newclosed

Good catch.

psImage *psMatrixLUD(psImage *out, psVector perm, const psImage *in);

It's probably worth also adding:

In order to avoid memory leaks, \code{perm} must be \code{NULL} on calling

\code{psMatrixLUD}.

comment:2 by robert.desonia@…, 21 years ago

FYI: I currently coded it so that if *perm is not NULL, the psVector is recycled
and there is no risk of a memory leak there.

-rdd

comment:3 by Eric.VanAlst@…, 21 years ago

Document change in SDR-12.

Note: See TracTickets for help on using tickets.