mkl_sparse_handle.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*******************************************************************************
  2. * Copyright 2004-2022 Intel Corporation.
  3. *
  4. * This software and the related documents are Intel copyrighted materials, and
  5. * your use of them is governed by the express license under which they were
  6. * provided to you (License). Unless the License provides otherwise, you may not
  7. * use, modify, copy, publish, distribute, disclose or transmit this software or
  8. * the related documents without Intel's prior written permission.
  9. *
  10. * This software and the related documents are provided as is, with no express
  11. * or implied warranties, other than those that are expressly stated in the
  12. * License.
  13. *******************************************************************************/
  14. /*
  15. * Content:
  16. * Intel(R) oneAPI Math Kernel Library (oneMKL) DSS C header file
  17. *
  18. * Contains more detailed information on internal datatypes and
  19. * constants used by DSS interface to PARDISO.
  20. *
  21. ********************************************************************************
  22. */
  23. #ifndef __MKL_SPARSE_HANDLE_H
  24. #define __MKL_SPARSE_HANDLE_H
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #ifndef MKL_CALL_CONV
  29. # if defined(_WIN32) & !defined(_WIN64)
  30. # define MKL_CALL_CONV __cdecl
  31. # else
  32. # define MKL_CALL_CONV
  33. # endif
  34. #endif
  35. typedef enum { MKL_ZERO_BASED, MKL_ONE_BASED } sparse_matrix_indexing;
  36. typedef enum { MKL_C_STYLE, MKL_FORTRAN_STYLE } sparse_matrix_print_styles;
  37. typedef enum { MKL_CSR } sparse_matrix_formats;
  38. typedef enum { MKL_GENERAL_STRUCTURE, MKL_UPPER_TRIANGULAR, MKL_LOWER_TRIANGULAR, MKL_STRUCTURAL_SYMMETRIC } sparse_matrix_structures;
  39. typedef enum { MKL_NO_PRINT, MKL_PRINT } sparse_matrix_message_levels;
  40. typedef enum { MKL_SPARSE_CHECKER_SUCCESS = 0, MKL_SPARSE_CHECKER_NON_MONOTONIC = 21, MKL_SPARSE_CHECKER_OUT_OF_RANGE = 22, MKL_SPARSE_CHECKER_NONTRIANGULAR = 23, MKL_SPARSE_CHECKER_NONORDERED = 24} sparse_checker_error_values;
  41. typedef struct _sparse_struct {
  42. MKL_INT n, *csr_ia, *csr_ja, check_result[3];
  43. sparse_matrix_indexing indexing;
  44. sparse_matrix_structures matrix_structure;
  45. sparse_matrix_formats matrix_format;
  46. sparse_matrix_message_levels message_level;
  47. sparse_matrix_print_styles print_style;
  48. } sparse_struct;
  49. extern void MKL_CALL_CONV sparse_matrix_checker_init (sparse_struct*);
  50. extern sparse_checker_error_values MKL_CALL_CONV sparse_matrix_checker (sparse_struct*);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif