black_scholes_generated.jl 811 B

1234567891011121314151617181920212223242526272829303132333435
  1. if length(ARGS) != 5
  2. println("Usage: julia prog.jl start_data_nbr step_data_nbr stop_data_nbr nslices nbr_tests")
  3. quit()
  4. end
  5. if (parse(Int64,ARGS[1]) < parse(Int64,ARGS[4]))
  6. println("The number of slices must be smaller than the number of data")
  7. quit()
  8. end
  9. include("../../src/Wrapper/Julia/starpu_include.jl")
  10. using StarPU
  11. @debugprint "starpu_init"
  12. starpu_init(extern_task_path = "../build/generated_tasks_black_scholes")
  13. perfmodel = StarpuPerfmodel(
  14. perf_type = STARPU_HISTORY_BASED,
  15. symbol = "history_perf"
  16. )
  17. cl = StarpuCodelet(
  18. cpu_func = "black_scholes",
  19. gpu_func = "CUDA_black_scholes",
  20. modes = [STARPU_RW, STARPU_RW],
  21. perfmodel = perfmodel
  22. )
  23. include("black_scholes_def.jl")
  24. display_times(map( (x->parse(Int64, x)), ARGS)...)
  25. @debugprint "starpu_shutdown"
  26. starpu_shutdown()