plugin_cuda_config.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* Copyright (C) 2013 Mamadou DIOP
  2. * Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
  3. *
  4. * This file is part of Open Source Doubango Framework.
  5. *
  6. * DOUBANGO is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * DOUBANGO is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with DOUBANGO.
  18. */
  19. #ifndef PLUGIN_CUDA_CONFIG_H
  20. #define PLUGIN_CUDA_CONFIG_H
  21. #ifdef __SYMBIAN32__
  22. #undef _WIN32 /* Because of WINSCW */
  23. #endif
  24. // Windows (XP/Vista/7/CE and Windows Mobile) macro definition
  25. #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
  26. # define PLUGIN_CUDA_UNDER_WINDOWS 1
  27. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  28. # define PLUGIN_CUDA_UNDER_WINDOWS_RT 1
  29. # endif
  30. #endif
  31. #if (PLUGIN_CUDA_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(PLUGIN_CUDA_EXPORTS)
  32. # define PLUGIN_CUDA_API __declspec(dllexport)
  33. # define PLUGIN_CUDA_GEXTERN extern __declspec(dllexport)
  34. #elif (PLUGIN_CUDA_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(PLUGIN_CUDA_IMPORTS_IGNORE)
  35. # define PLUGIN_CUDA_API __declspec(dllimport)
  36. # define PLUGIN_CUDA_GEXTERN __declspec(dllimport)
  37. #else
  38. # define PLUGIN_CUDA_API
  39. # define PLUGIN_CUDA_GEXTERN extern
  40. #endif
  41. // x86
  42. #if defined(__x86_64__) || defined(__x86__) || defined(__i386__)
  43. # define PLUGIN_CUDA_UNDER_X86 1
  44. #endif
  45. // Guards against C++ name mangling
  46. #ifdef __cplusplus
  47. # define PLUGIN_CUDA_BEGIN_DECLS extern "C" {
  48. # define PLUGIN_CUDA_END_DECLS }
  49. #else
  50. # define PLUGIN_CUDA_BEGIN_DECLS
  51. # define PLUGIN_CUDA_END_DECLS
  52. #endif
  53. #ifdef _MSC_VER
  54. # define inline __inline
  55. # define _CRT_SECURE_NO_WARNINGS
  56. # define _ALLOW_KEYWORD_MACROS
  57. #endif
  58. #include <stdint.h>
  59. #ifdef __SYMBIAN32__
  60. #include <stdlib.h>
  61. #endif
  62. #if HAVE_CONFIG_H
  63. #include <config.h>
  64. #endif
  65. #endif // PLUGIN_CUDA_CONFIG_H