Ipopt Documentation  
IpBlas.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2006 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6 
7 #ifndef __IPBLAS_HPP__
8 #define __IPBLAS_HPP__
9 
10 #include "IpUtils.hpp"
11 
12 namespace Ipopt
13 {
20  Index size,
21  const Number* x,
22  Index incX,
23  const Number* y,
24  Index incY
25 );
26 
35  Index size,
36  const Number* x,
37  Index incX,
38  const Number* y,
39  Index incY
40 )
41 {
42  return IpBlasDot(size, x, incX, y, incY);
43 }
44 
51  Index size,
52  const Number* x,
53  Index incX
54 );
55 
64  Index size,
65  const Number* x,
66  Index incX
67 )
68 {
69  return IpBlasNrm2(size, x, incX);
70 }
71 
78  Index size,
79  const Number* x,
80  Index incX
81 );
82 
91  Index size,
92  const Number* x,
93  Index incX
94 )
95 {
96  return IpBlasAsum(size, x, incX);
97 }
98 
105  Index size,
106  const Number* x,
107  Index incX
108 );
109 
117 inline int IpBlasIdamax(
118  Index size,
119  const Number* x,
120  Index incX
121 )
122 {
123  return (int)IpBlasIamax(size, x, incX);
124 }
125 
132  Index size,
133  const Number* x,
134  Index incX,
135  Number* y,
136  Index incY
137 );
138 
146 inline void IpBlasDcopy(
147  Index size,
148  const Number* x,
149  Index incX,
150  Number* y,
151  Index incY
152 )
153 {
154  IpBlasCopy(size, x, incX, y, incY);
155 }
156 
163  Index size,
164  Number alpha,
165  const Number* x,
166  Index incX,
167  Number* y,
168  Index incY
169 );
170 
178 inline void IpBlasDaxpy(
179  Index size,
180  Number alpha,
181  const Number* x,
182  Index incX,
183  Number* y,
184  Index incY
185 )
186 {
187  IpBlasAxpy(size, alpha, x, incX, y, incY);
188 }
189 
196  Index size,
197  Number alpha,
198  Number* x,
199  Index incX
200 );
201 
209 inline void IpBlasDscal(
210  Index size,
211  Number alpha,
212  Number* x,
213  Index incX
214 )
215 {
216  IpBlasScal(size, alpha, x, incX);
217 }
218 
225  bool trans,
226  Index nRows,
227  Index nCols,
228  Number alpha,
229  const Number* A,
230  Index ldA,
231  const Number* x,
232  Index incX,
233  Number beta,
234  Number* y,
235  Index incY
236 );
237 
245 inline void IpBlasDgemv(
246  bool trans,
247  Index nRows,
248  Index nCols,
249  Number alpha,
250  const Number* A,
251  Index ldA,
252  const Number* x,
253  Index incX,
254  Number beta,
255  Number* y,
256  Index incY
257 )
258 {
259  IpBlasGemv(trans, nRows, nCols, alpha, A, ldA, x, incX, beta, y, incY);
260 }
261 
268  Index n,
269  Number alpha,
270  const Number* A,
271  Index ldA,
272  const Number* x,
273  Index incX,
274  Number beta,
275  Number* y,
276  Index incY
277 );
278 
286 inline void IpBlasDsymv(
287  Index n,
288  Number alpha,
289  const Number* A,
290  Index ldA,
291  const Number* x,
292  Index incX,
293  Number beta,
294  Number* y,
295  Index incY
296 )
297 {
298  IpBlasSymv(n, alpha, A, ldA, x, incX, beta, y, incY);
299 }
300 
307  bool transa,
308  bool transb,
309  Index m,
310  Index n,
311  Index k,
312  Number alpha,
313  const Number* A,
314  Index ldA,
315  const Number* B,
316  Index ldB,
317  Number beta,
318  Number* C,
319  Index ldC
320 );
321 
329 inline void IpBlasDgemm(
330  bool transa,
331  bool transb,
332  Index m,
333  Index n,
334  Index k,
335  Number alpha,
336  const Number* A,
337  Index ldA,
338  const Number* B,
339  Index ldB,
340  Number beta,
341  Number* C,
342  Index ldC
343 )
344 {
345  IpBlasGemm(transa, transb, m, n, k, alpha, A, ldA, B, ldB, beta, C, ldC);
346 }
347 
354  bool trans,
355  Index ndim,
356  Index nrank,
357  Number alpha,
358  const Number* A,
359  Index ldA,
360  Number beta,
361  Number* C,
362  Index ldC
363 );
364 
372 inline void IpBlasDsyrk(
373  bool trans,
374  Index ndim,
375  Index nrank,
376  Number alpha,
377  const Number* A,
378  Index ldA,
379  Number beta,
380  Number* C,
381  Index ldC
382 )
383 {
384  IpBlasSyrk(trans, ndim, nrank, alpha, A, ldA, beta, C, ldC);
385 }
386 
393  bool trans,
394  Index ndim,
395  Index nrhs,
396  Number alpha,
397  const Number* A,
398  Index ldA,
399  Number* B,
400  Index ldB
401 );
402 
410 inline void IpBlasDtrsm(
411  bool trans,
412  Index ndim,
413  Index nrhs,
414  Number alpha,
415  const Number* A,
416  Index ldA,
417  Number* B,
418  Index ldB
419 )
420 {
421  IpBlasTrsm(trans, ndim, nrhs, alpha, A, ldA, B, ldB);
422 }
423 
424 } // namespace Ipopt
425 
426 #endif
IpUtils.hpp
Ipopt::IpBlasTrsm
IPOPTLIB_EXPORT void IpBlasTrsm(bool trans, Index ndim, Index nrhs, Number alpha, const Number *A, Index ldA, Number *B, Index ldB)
Wrapper for BLAS subroutine XTRSM.
Ipopt::IpBlasSymv
IPOPTLIB_EXPORT void IpBlasSymv(Index n, Number alpha, const Number *A, Index ldA, const Number *x, Index incX, Number beta, Number *y, Index incY)
Wrapper for BLAS subroutine XSYMV.
Ipopt::IpBlasDgemm
IPOPT_DEPRECATED void IpBlasDgemm(bool transa, bool transb, Index m, Index n, Index k, Number alpha, const Number *A, Index ldA, const Number *B, Index ldB, Number beta, Number *C, Index ldC)
Wrapper for BLAS subroutine DGEMM.
Definition: IpBlas.hpp:329
Ipopt::IpBlasDsyrk
IPOPT_DEPRECATED void IpBlasDsyrk(bool trans, Index ndim, Index nrank, Number alpha, const Number *A, Index ldA, Number beta, Number *C, Index ldC)
Wrapper for BLAS subroutine DSYRK.
Definition: IpBlas.hpp:372
Ipopt::IpBlasDot
IPOPTLIB_EXPORT Number IpBlasDot(Index size, const Number *x, Index incX, const Number *y, Index incY)
Wrapper for BLAS function XDOT.
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::IpBlasDsymv
IPOPT_DEPRECATED void IpBlasDsymv(Index n, Number alpha, const Number *A, Index ldA, const Number *x, Index incX, Number beta, Number *y, Index incY)
Wrapper for BLAS subroutine DSYMV.
Definition: IpBlas.hpp:286
Ipopt::IpBlasCopy
IPOPTLIB_EXPORT void IpBlasCopy(Index size, const Number *x, Index incX, Number *y, Index incY)
Wrapper for BLAS subroutine XCOPY.
Ipopt::IpBlasDasum
IPOPT_DEPRECATED Number IpBlasDasum(Index size, const Number *x, Index incX)
Wrapper for BLAS function DASUM.
Definition: IpBlas.hpp:90
Ipopt::IpBlasIdamax
IPOPT_DEPRECATED int IpBlasIdamax(Index size, const Number *x, Index incX)
Wrapper for BLAS function IDAMAX.
Definition: IpBlas.hpp:117
Ipopt::IpBlasGemv
IPOPTLIB_EXPORT void IpBlasGemv(bool trans, Index nRows, Index nCols, Number alpha, const Number *A, Index ldA, const Number *x, Index incX, Number beta, Number *y, Index incY)
Wrapper for BLAS subroutine XGEMV.
IPOPTLIB_EXPORT
#define IPOPTLIB_EXPORT
Definition: config_default.h:10
Ipopt::IpBlasDaxpy
IPOPT_DEPRECATED void IpBlasDaxpy(Index size, Number alpha, const Number *x, Index incX, Number *y, Index incY)
Wrapper for BLAS subroutine DAXPY.
Definition: IpBlas.hpp:178
Ipopt::IpBlasDdot
IPOPT_DEPRECATED Number IpBlasDdot(Index size, const Number *x, Index incX, const Number *y, Index incY)
Wrapper for BLAS function DDOT.
Definition: IpBlas.hpp:34
Ipopt::IpBlasDtrsm
IPOPT_DEPRECATED void IpBlasDtrsm(bool trans, Index ndim, Index nrhs, Number alpha, const Number *A, Index ldA, Number *B, Index ldB)
Wrapper for BLAS subroutine DTRSM.
Definition: IpBlas.hpp:410
Ipopt::IpBlasDgemv
IPOPT_DEPRECATED void IpBlasDgemv(bool trans, Index nRows, Index nCols, Number alpha, const Number *A, Index ldA, const Number *x, Index incX, Number beta, Number *y, Index incY)
Wrapper for BLAS subroutine DGEMV.
Definition: IpBlas.hpp:245
Ipopt::IpBlasAsum
IPOPTLIB_EXPORT Number IpBlasAsum(Index size, const Number *x, Index incX)
Wrapper for BLAS function XASUM.
Ipopt::Index
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
Ipopt::Number
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::IpBlasDcopy
IPOPT_DEPRECATED void IpBlasDcopy(Index size, const Number *x, Index incX, Number *y, Index incY)
Wrapper for BLAS subroutine DCOPY.
Definition: IpBlas.hpp:146
Ipopt::IpBlasScal
IPOPTLIB_EXPORT void IpBlasScal(Index size, Number alpha, Number *x, Index incX)
Wrapper for BLAS subroutine XSCAL.
IPOPT_DEPRECATED
#define IPOPT_DEPRECATED
macro to declare symbols as deprecated
Definition: IpTypes.h:25
Ipopt::IpBlasSyrk
IPOPTLIB_EXPORT void IpBlasSyrk(bool trans, Index ndim, Index nrank, Number alpha, const Number *A, Index ldA, Number beta, Number *C, Index ldC)
Wrapper for BLAS subroutine XSYRK.
Ipopt::IpBlasAxpy
IPOPTLIB_EXPORT void IpBlasAxpy(Index size, Number alpha, const Number *x, Index incX, Number *y, Index incY)
Wrapper for BLAS subroutine XAXPY.
Ipopt::IpBlasNrm2
IPOPTLIB_EXPORT Number IpBlasNrm2(Index size, const Number *x, Index incX)
Wrapper for BLAS function XNRM2.
Ipopt::IpBlasGemm
IPOPTLIB_EXPORT void IpBlasGemm(bool transa, bool transb, Index m, Index n, Index k, Number alpha, const Number *A, Index ldA, const Number *B, Index ldB, Number beta, Number *C, Index ldC)
Wrapper for BLAS subroutine XGEMM.
Ipopt::IpBlasDscal
IPOPT_DEPRECATED void IpBlasDscal(Index size, Number alpha, Number *x, Index incX)
Wrapper for BLAS subroutine DSCAL.
Definition: IpBlas.hpp:209
Ipopt::IpBlasDnrm2
IPOPT_DEPRECATED Number IpBlasDnrm2(Index size, const Number *x, Index incX)
Wrapper for BLAS function DNRM2.
Definition: IpBlas.hpp:63
Ipopt::IpBlasIamax
IPOPTLIB_EXPORT Index IpBlasIamax(Index size, const Number *x, Index incX)
Wrapper for BLAS function IXAMAX.