gsl_cblas__cblas.h 964 B

1234567891011121314151617181920212223242526272829303132333435
  1. #define INDEX int
  2. #define OFFSET(N, incX) ((incX) > 0 ? 0 : ((N) - 1) * (-(incX)))
  3. #define BLAS_ERROR(x) cblas_xerbla(0, __FILE__, x);
  4. #define CONJUGATE(x) ((x) == CblasConjTrans)
  5. #define TRANSPOSE(x) ((x) == CblasTrans || (x) == CblasConjTrans)
  6. #define UPPER(x) ((x) == CblasUpper)
  7. #define LOWER(x) ((x) == CblasLower)
  8. /* Handling of packed complex types... */
  9. #define REAL(a,i) (((BASE *) a)[2*(i)])
  10. #define IMAG(a,i) (((BASE *) a)[2*(i)+1])
  11. #define REAL0(a) (((BASE *)a)[0])
  12. #define IMAG0(a) (((BASE *)a)[1])
  13. #define CONST_REAL(a,i) (((const BASE *) a)[2*(i)])
  14. #define CONST_IMAG(a,i) (((const BASE *) a)[2*(i)+1])
  15. #define CONST_REAL0(a) (((const BASE *)a)[0])
  16. #define CONST_IMAG0(a) (((const BASE *)a)[1])
  17. #define GB(KU,KL,lda,i,j) ((KU+1+(i-j))*lda + j)
  18. #define TRCOUNT(N,i) ((((i)+1)*(2*(N)-(i)))/2)
  19. /* #define TBUP(N,i,j) */
  20. /* #define TBLO(N,i,j) */
  21. #define TPUP(N,i,j) (TRCOUNT(N,(i)-1)+(j)-(i))
  22. #define TPLO(N,i,j) (((i)*((i)+1))/2 + (j))