pxlu.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010, 2014 Université de Bordeaux
  4. * Copyright (C) 2010, 2012, 2014, 2017 CNRS
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __PXLU_H__
  18. #define __PXLU_H__
  19. #include <starpu.h>
  20. #include <common/blas.h>
  21. #include <starpu_mpi.h>
  22. #ifdef STARPU_USE_CUDA
  23. #include <cublas.h>
  24. #endif
  25. #define BLAS3_FLOP(n1,n2,n3) \
  26. (2*((uint64_t)n1)*((uint64_t)n2)*((uint64_t)n3))
  27. //#define SINGLE_TMP11 1
  28. //#define SINGLE_TMP1221 1
  29. struct debug_info
  30. {
  31. unsigned i;
  32. unsigned j;
  33. unsigned k;
  34. };
  35. double STARPU_PLU(plu_main)(unsigned nblocks, int rank, int world_size);
  36. TYPE *STARPU_PLU(reconstruct_matrix)(unsigned size, unsigned nblocks);
  37. void STARPU_PLU(compute_lu_matrix)(unsigned size, unsigned nblocks, TYPE *Asaved);
  38. unsigned STARPU_PLU(display_flag)(void);
  39. void STARPU_PLU(compute_ax)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  40. void STARPU_PLU(compute_lux)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  41. starpu_data_handle_t STARPU_PLU(get_block_handle)(unsigned i, unsigned j);
  42. TYPE *STARPU_PLU(get_block)(unsigned i, unsigned j);
  43. #ifdef SINGLE_TMP11
  44. starpu_data_handle_t STARPU_PLU(get_tmp_11_block_handle)(void);
  45. #else
  46. starpu_data_handle_t STARPU_PLU(get_tmp_11_block_handle)(unsigned k);
  47. #endif
  48. #ifdef SINGLE_TMP1221
  49. starpu_data_handle_t STARPU_PLU(get_tmp_12_block_handle)(unsigned j);
  50. starpu_data_handle_t STARPU_PLU(get_tmp_21_block_handle)(unsigned i);
  51. #else
  52. starpu_data_handle_t STARPU_PLU(get_tmp_12_block_handle)(unsigned j, unsigned k);
  53. starpu_data_handle_t STARPU_PLU(get_tmp_21_block_handle)(unsigned i, unsigned k);
  54. #endif
  55. void STARPU_PLU(display_data_content)(TYPE *data, unsigned blocksize);
  56. int get_block_rank(unsigned i, unsigned j);
  57. #endif // __PXLU_H__