Shuld be 'const' some vector imput arguments in CULA?

General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

Shuld be 'const' some vector imput arguments in CULA?

Postby jgpallero » Fri May 10, 2013 10:59 am

First of all, this is my first message, so I apologize if thist question is posted in an incorrect section of the forum.

I see that all CULA functions like culaDpotrs, culaDgetri, culaDgetrs, for example, declare its vector arguments A and ipiv (where is needed) simply as
Code: Select all
culaDouble* A

Code: Select all
culaInt* ipiv

In these cases A and ipiv are not modified by the function so the common practice is declare them as
Code: Select all
const double* A

Code: Select all
const int* ipiv

as, for example, LAPACKE and ATLAS do.

I think it is a good practice and I suggest it in CULA. On the other hand, this practice will prevents compiler warnings when these arguments are passed as const, for example if we are programming some wrapper in order to select to use CULA or other Lapack implementation as LAPACKE, Intel MKL or ATLAS
Posts: 10
Joined: Wed May 08, 2013 3:01 pm

Re: Shuld be 'const' some vector imput arguments in CULA?

Postby john » Fri May 10, 2013 12:54 pm

We actually targeted CLAPACK for closest compatibility, and it doesn't mark arguments as const, so we matched that. But marking the interface properly const is something we consider doing.
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 2 guests