pxlu.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * StarPU
  3. * Copyright (C) Université Bordeaux 1, CNRS 2008-2010 (see AUTHORS file)
  4. *
  5. * This program 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. * This program 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. #ifndef __PXLU_H__
  17. #define __PXLU_H__
  18. /* for STARPU_USE_CUDA */
  19. #include <starpu_config.h>
  20. #include <starpu.h>
  21. #include <starpu_cuda.h>
  22. #include <common/blas.h>
  23. #include <starpu_mpi.h>
  24. #define BLAS3_FLOP(n1,n2,n3) \
  25. (2*((uint64_t)n1)*((uint64_t)n2)*((uint64_t)n3))
  26. //#define SINGLE_TMP11 1
  27. //#define SINGLE_TMP1221 1
  28. struct debug_info {
  29. unsigned i;
  30. unsigned j;
  31. unsigned k;
  32. };
  33. double STARPU_PLU(plu_main)(unsigned nblocks, int rank, int world_size);
  34. TYPE *STARPU_PLU(reconstruct_matrix)(unsigned size, unsigned nblocks);
  35. void STARPU_PLU(compute_lu_matrix)(unsigned size, unsigned nblocks, TYPE *Asaved);
  36. unsigned STARPU_PLU(display_flag)(void);
  37. void STARPU_PLU(compute_ax)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  38. void STARPU_PLU(compute_lux)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  39. starpu_data_handle STARPU_PLU(get_block_handle)(unsigned i, unsigned j);
  40. TYPE *STARPU_PLU(get_block)(unsigned i, unsigned j);
  41. #ifdef SINGLE_TMP11
  42. starpu_data_handle STARPU_PLU(get_tmp_11_block_handle)(void);
  43. #else
  44. starpu_data_handle STARPU_PLU(get_tmp_11_block_handle)(unsigned k);
  45. #endif
  46. #ifdef SINGLE_TMP1221
  47. starpu_data_handle STARPU_PLU(get_tmp_12_block_handle)(unsigned j);
  48. starpu_data_handle STARPU_PLU(get_tmp_21_block_handle)(unsigned i);
  49. #else
  50. starpu_data_handle STARPU_PLU(get_tmp_12_block_handle)(unsigned j, unsigned k);
  51. starpu_data_handle STARPU_PLU(get_tmp_21_block_handle)(unsigned i, unsigned k);
  52. #endif
  53. void STARPU_PLU(display_data_content)(TYPE *data, unsigned blocksize);
  54. int get_block_rank(unsigned i, unsigned j);
  55. #endif // __PXLU_H__