blas_model.h 1.5 KB

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