blas_model.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009, 2010-2011 Université de Bordeaux 1
  4. * Copyright (C) 2010 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 __BLAS_MODEL_H__
  18. #define __BLAS_MODEL_H__
  19. #include <starpu.h>
  20. double gemm_cost(starpu_buffer_descr *descr);
  21. static struct starpu_perfmodel_t starpu_sgemm_model = {
  22. .type = STARPU_HISTORY_BASED,
  23. #ifdef STARPU_ATLAS
  24. .symbol = "sgemm_atlas"
  25. #elif defined(STARPU_GOTO)
  26. .symbol = "sgemm_goto"
  27. #else
  28. .symbol = "sgemm"
  29. #endif
  30. };
  31. static struct starpu_perfmodel_t starpu_sgemm_model_common = {
  32. .cost_model = gemm_cost,
  33. .type = STARPU_COMMON,
  34. };
  35. static struct starpu_perfmodel_t starpu_dgemm_model = {
  36. .type = STARPU_HISTORY_BASED,
  37. #ifdef STARPU_ATLAS
  38. .symbol = "dgemm_atlas"
  39. #elif defined(STARPU_GOTO)
  40. .symbol = "dgemm_goto"
  41. #else
  42. .symbol = "dgemm"
  43. #endif
  44. };
  45. static struct starpu_perfmodel_t starpu_dgemm_model_common = {
  46. .cost_model = gemm_cost,
  47. .type = STARPU_COMMON,
  48. };
  49. #endif /* __BLAS_MODEL_H__ */