globals.jl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. global starpu_wrapper_library_handle = C_NULL
  17. global starpu_tasks_library_handle = C_NULL
  18. global starpu_target=STARPU_CPU
  19. global generated_cuda_kernel_file_name = "PRINT TO STDOUT"
  20. global generated_cpu_kernel_file_name = "PRINT TO STDOUT"
  21. global CPU_CODELETS=Dict{String,String}()
  22. global CUDA_CODELETS=Dict{String,String}()
  23. global CODELETS_SCALARS=Dict{String,Any}()
  24. global CODELETS_PARAMS_STRUCT=Dict{String,Any}()
  25. global starpu_type_traduction_dict = Dict(
  26. Int32 => "int32_t",
  27. UInt32 => "uint32_t",
  28. Float32 => "float",
  29. Int64 => "int64_t",
  30. UInt64 => "uint64_t",
  31. Float64 => "double",
  32. Nothing => "void"
  33. )
  34. export starpu_type_traduction_dict
  35. global mutex = Threads.SpinLock()
  36. # detect CUDA support
  37. try
  38. STARPU_USE_CUDA == 1
  39. catch
  40. global const STARPU_USE_CUDA = 0
  41. end