maxloc.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* maxloc.f -- translated by f2c (version 20061008).
  2. You must link the resulting object file with libf2c:
  3. on Microsoft Windows system, link with libf2c.lib;
  4. on Linux or Unix systems, link with .../path/to/libf2c.a -lm
  5. or, if you install libf2c.a in a standard place, with -lf2c -lm
  6. -- in that order, at the end of the command line, as in
  7. cc *.o -lf2c -lm
  8. Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
  9. http://www.netlib.org/f2c/libf2c.zip
  10. */
  11. #include "f2c.h"
  12. /* ********************************************************************************** */
  13. integer _starpu_smaxloc_(real *a, integer *dimm)
  14. {
  15. /* System generated locals */
  16. integer ret_val, i__1;
  17. /* Local variables */
  18. integer i__;
  19. real smax;
  20. /* Parameter adjustments */
  21. --a;
  22. /* Function Body */
  23. ret_val = 1;
  24. smax = a[1];
  25. i__1 = *dimm;
  26. for (i__ = 2; i__ <= i__1; ++i__) {
  27. if (smax < a[i__]) {
  28. smax = a[i__];
  29. ret_val = i__;
  30. }
  31. /* L10: */
  32. }
  33. return ret_val;
  34. } /* _starpu_smaxloc_ */
  35. /* ********************************************************************************** */
  36. integer _starpu_dmaxloc_(doublereal *a, integer *dimm)
  37. {
  38. /* System generated locals */
  39. integer ret_val, i__1;
  40. /* Local variables */
  41. integer i__;
  42. doublereal dmax__;
  43. /* Parameter adjustments */
  44. --a;
  45. /* Function Body */
  46. ret_val = 1;
  47. dmax__ = a[1];
  48. i__1 = *dimm;
  49. for (i__ = 2; i__ <= i__1; ++i__) {
  50. if (dmax__ < a[i__]) {
  51. dmax__ = a[i__];
  52. ret_val = i__;
  53. }
  54. /* L20: */
  55. }
  56. return ret_val;
  57. } /* _starpu_dmaxloc_ */