Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

enum_fortran.inc 4.2 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ! BSD 2-Clause License
  2. !
  3. ! Copyright (c) 2021-2022, Hewlett Packard Enterprise
  4. ! All rights reserved.
  5. !
  6. ! Redistribution and use in source and binary forms, with or without
  7. ! modification, are permitted provided that the following conditions are met:
  8. !
  9. ! 1. Redistributions of source code must retain the above copyright notice, this
  10. ! list of conditions and the following disclaimer.
  11. !
  12. ! 2. Redistributions in binary form must reproduce the above copyright notice,
  13. ! this list of conditions and the following disclaimer in the documentation
  14. ! and/or other materials provided with the distribution.
  15. !
  16. ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  17. ! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. ! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  20. ! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. ! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  22. ! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  23. ! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  24. ! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  25. ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. ! The following enums have analogues to the C and C++ clients. Fortran does not have named enums, but the name:value
  27. ! parameters must be the same. By convention negative enums, represent items that are not supported in the Fortran
  28. ! client.
  29. ! TensorType
  30. enum, bind(c)
  31. enumerator :: tensor_invalid = -1 ! Invalid or uninitialized tensor type
  32. enumerator :: tensor_dbl = 1 ! Double-precision floating point tensor type
  33. enumerator :: tensor_flt = 2 ! Floating point tensor type
  34. enumerator :: tensor_int8 = 3 ! 8-bit signed integer tensor type
  35. enumerator :: tensor_int16 = 4 ! 16-bit signed integer tensor type
  36. enumerator :: tensor_int32 = 5 ! 32-bit signed integer tensor type
  37. enumerator :: tensor_int64 = 6 ! 64-bit signed integer tensor type
  38. enumerator :: tensor_uint8 = -1 ! 8-bit unsigned integer tensor type
  39. enumerator :: tensor_uint16 = -1 ! 16-bit unsigned integer tensor type
  40. end enum
  41. ! MemoryLayout​
  42. enum, bind(c)
  43. enumerator :: c_invalid = -1 ! Invalid or uninitialized memory layout
  44. enumerator :: c_nested = 1 ! Multidimensional row-major array layout with nested arrays of
  45. ! pointers (contiguous at innermost layer)
  46. enumerator :: c_contiguous = 2 ! Multidimensional row-major array layout in contiguous memory
  47. enumerator :: c_fortran_nested = 3 ! Multidimensional column-major array layout with nested arrays of
  48. ! pointers (contiguous at innermost layer)
  49. enumerator :: c_fortran_contiguous = 4 ! Multidimensional column-major array layout in contiguous memory
  50. end enum
  51. ! MetadataType​
  52. enum, bind(c)
  53. enumerator :: meta_invalid = -1 ! Invalid or uninitialized metadata
  54. enumerator :: meta_dbl = 1 ! Double-precision floating point metadata
  55. enumerator :: meta_flt = 2 ! Floating point metadata
  56. enumerator :: meta_int32 = 3 ! 32-bit signed integer metadata
  57. enumerator :: meta_int64 = 4 ! 64-bit signed integer metadata
  58. enumerator :: meta_uint32 = -1 ! 32-bit unsigned integer metadata
  59. enumerator :: meta_uint64 = -1 ! 64-bit unsigned integer metadata
  60. enumerator :: meta_string = 7 ! ASCII text string metadata
  61. end enum
  62. ! SRError
  63. enum, bind(c)
  64. enumerator :: SRNoError = 0 ! No error
  65. enumerator :: SRBadAllocError = 1 ! Memory allocation error
  66. enumerator :: SRDatabaseError = 2 ! Backend database error
  67. enumerator :: SRInternalError = 3 ! Internal SmartRedis error
  68. enumerator :: SRRuntimeError = 4 ! Runtime error executing an operation
  69. enumerator :: SRParameterError = 5 ! Bad parameter error
  70. enumerator :: SRTimeoutError = 6 ! Timeout error
  71. enumerator :: SRKeyError = 7 ! Key error
  72. enumerator :: SRInvalidError = -1 ! Uninitialized error variable
  73. enumerator :: SRTypeError = 9 ! Type mismatch
  74. end enum