You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

divtable.c 5.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*********************************************************************/
  2. /* Copyright 2009, 2010 The University of Texas at Austin. */
  3. /* All rights reserved. */
  4. /* */
  5. /* Redistribution and use in source and binary forms, with or */
  6. /* without modification, are permitted provided that the following */
  7. /* conditions are met: */
  8. /* */
  9. /* 1. Redistributions of source code must retain the above */
  10. /* copyright notice, this list of conditions and the following */
  11. /* disclaimer. */
  12. /* */
  13. /* 2. Redistributions in binary form must reproduce the above */
  14. /* copyright notice, this list of conditions and the following */
  15. /* disclaimer in the documentation and/or other materials */
  16. /* provided with the distribution. */
  17. /* */
  18. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  19. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  20. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  21. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  22. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  23. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  24. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  25. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  26. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  27. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  28. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  29. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  30. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  31. /* POSSIBILITY OF SUCH DAMAGE. */
  32. /* */
  33. /* The views and conclusions contained in the software and */
  34. /* documentation are those of the authors and should not be */
  35. /* interpreted as representing official policies, either expressed */
  36. /* or implied, of The University of Texas at Austin. */
  37. /*********************************************************************/
  38. #include "common.h"
  39. #ifdef SMP
  40. #if !defined(USE64BITINT) || defined(ARCH_X86)
  41. unsigned int blas_quick_divide_table[] = {
  42. 0x00000000, 0x00000001, 0x80000001, 0x55555556,
  43. 0x40000001, 0x33333334, 0x2aaaaaab, 0x24924925,
  44. 0x20000001, 0x1c71c71d, 0x1999999a, 0x1745d175,
  45. 0x15555556, 0x13b13b14, 0x12492493, 0x11111112,
  46. 0x10000001, 0x0f0f0f10, 0x0e38e38f, 0x0d79435f,
  47. 0x0ccccccd, 0x0c30c30d, 0x0ba2e8bb, 0x0b21642d,
  48. 0x0aaaaaab, 0x0a3d70a4, 0x09d89d8a, 0x097b425f,
  49. 0x0924924a, 0x08d3dcb1, 0x08888889, 0x08421085,
  50. 0x08000001, 0x07c1f07d, 0x07878788, 0x07507508,
  51. 0x071c71c8, 0x06eb3e46, 0x06bca1b0, 0x06906907,
  52. 0x06666667, 0x063e7064, 0x06186187, 0x05f417d1,
  53. 0x05d1745e, 0x05b05b06, 0x0590b217, 0x0572620b,
  54. 0x05555556, 0x0539782a, 0x051eb852, 0x05050506,
  55. 0x04ec4ec5, 0x04d4873f, 0x04bda130, 0x04a7904b,
  56. 0x04924925, 0x047dc120, 0x0469ee59, 0x0456c798,
  57. 0x04444445, 0x04325c54, 0x04210843, 0x04104105,
  58. 0x04000001,
  59. };
  60. #else
  61. BLASULONG blas_quick_divide_table[] = {
  62. 0x0000000000000000, 0x0000000000000001, 0x8000000000000001, 0x5555555555555557,
  63. 0x4000000000000001, 0x3333333333333335, 0x2aaaaaaaaaaaaaac, 0x2492492492492494,
  64. 0x2000000000000001, 0x1c71c71c71c71c73, 0x199999999999999b, 0x1745d1745d1745d3,
  65. 0x1555555555555557, 0x13b13b13b13b13b3, 0x124924924924924b, 0x1111111111111113,
  66. 0x1000000000000001, 0x0f0f0f0f0f0f0f11, 0x0e38e38e38e38e3a, 0x0d79435e50d79437,
  67. 0x0cccccccccccccce, 0x0c30c30c30c30c32, 0x0ba2e8ba2e8ba2ea, 0x0b21642c8590b218,
  68. 0x0aaaaaaaaaaaaaac, 0x0a3d70a3d70a3d72, 0x09d89d89d89d89da, 0x097b425ed097b427,
  69. 0x0924924924924926, 0x08d3dcb08d3dcb0a, 0x088888888888888a, 0x0842108421084212,
  70. 0x0800000000000001, 0x07c1f07c1f07c1f2, 0x0787878787878789, 0x0750750750750752,
  71. 0x071c71c71c71c71e, 0x06eb3e45306eb3e6, 0x06bca1af286bca1c, 0x0690690690690692,
  72. 0x0666666666666668, 0x063e7063e7063e72, 0x061861861861861a, 0x05f417d05f417d07,
  73. 0x05d1745d1745d176, 0x05b05b05b05b05b2, 0x0590b21642c8590d, 0x0572620ae4c415cb,
  74. 0x0555555555555557, 0x05397829cbc14e60, 0x051eb851eb851eba, 0x0505050505050507,
  75. 0x04ec4ec4ec4ec4ee, 0x04d4873ecade304f, 0x04bda12f684bda14, 0x04a7904a7904a792,
  76. 0x0492492492492494, 0x047dc11f7047dc13, 0x0469ee58469ee586, 0x0456c797dd49c343,
  77. 0x0444444444444446, 0x04325c53ef368eb2, 0x042108421084210a, 0x0410410410410412,
  78. 0x0400000000000001,
  79. };
  80. #endif
  81. #endif