pxlu.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010 Université de Bordeaux 1
  4. * Copyright (C) 2010, 2012 Centre National de la Recherche Scientifique
  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. #define BLAS3_FLOP(n1,n2,n3) \
  23. (2*((uint64_t)n1)*((uint64_t)n2)*((uint64_t)n3))
  24. //#define SINGLE_TMP11 1
  25. //#define SINGLE_TMP1221 1
  26. struct debug_info {
  27. unsigned i;
  28. unsigned j;
  29. unsigned k;
  30. };
  31. double STARPU_PLU(plu_main)(unsigned nblocks, int rank, int world_size);
  32. TYPE *STARPU_PLU(reconstruct_matrix)(unsigned size, unsigned nblocks);
  33. void STARPU_PLU(compute_lu_matrix)(unsigned size, unsigned nblocks, TYPE *Asaved);
  34. unsigned STARPU_PLU(display_flag)(void);
  35. void STARPU_PLU(compute_ax)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  36. void STARPU_PLU(compute_lux)(unsigned size, TYPE *x, TYPE *y, unsigned nblocks, int rank);
  37. starpu_data_handle_t STARPU_PLU(get_block_handle)(unsigned i, unsigned j);
  38. TYPE *STARPU_PLU(get_block)(unsigned i, unsigned j);
  39. #ifdef SINGLE_TMP11
  40. starpu_data_handle_t STARPU_PLU(get_tmp_11_block_handle)(void);
  41. #else
  42. starpu_data_handle_t STARPU_PLU(get_tmp_11_block_handle)(unsigned k);
  43. #endif
  44. #ifdef SINGLE_TMP1221
  45. starpu_data_handle_t STARPU_PLU(get_tmp_12_block_handle)(unsigned j);
  46. starpu_data_handle_t STARPU_PLU(get_tmp_21_block_handle)(unsigned i);
  47. #else
  48. starpu_data_handle_t STARPU_PLU(get_tmp_12_block_handle)(unsigned j, unsigned k);
  49. starpu_data_handle_t STARPU_PLU(get_tmp_21_block_handle)(unsigned i, unsigned k);
  50. #endif
  51. void STARPU_PLU(display_data_content)(TYPE *data, unsigned blocksize);
  52. int get_block_rank(unsigned i, unsigned j);
  53. #endif // __PXLU_H__