File: MemorySizeDistributions.cpp

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (139 lines) | stat: -rw-r--r-- 4,422 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#include "MemorySizeDistributions.h"

namespace llvm {
namespace libc_benchmarks {

static constexpr double MemcmpGoogleA[] = {
#include "distributions/MemcmpGoogleA.csv"
};
static constexpr double MemcmpGoogleB[] = {
#include "distributions/MemcmpGoogleB.csv"
};
static constexpr double MemcmpGoogleD[] = {
#include "distributions/MemcmpGoogleD.csv"
};
static constexpr double MemcmpGoogleQ[] = {
#include "distributions/MemcmpGoogleQ.csv"
};
static constexpr double MemcmpGoogleL[] = {
#include "distributions/MemcmpGoogleL.csv"
};
static constexpr double MemcmpGoogleM[] = {
#include "distributions/MemcmpGoogleM.csv"
};
static constexpr double MemcmpGoogleS[] = {
#include "distributions/MemcmpGoogleS.csv"
};
static constexpr double MemcmpGoogleW[] = {
#include "distributions/MemcmpGoogleW.csv"
};
static constexpr double MemcmpGoogleU[] = {
#include "distributions/MemcmpGoogleU.csv"
};
static constexpr double MemcpyGoogleA[] = {
#include "distributions/MemcpyGoogleA.csv"
};
static constexpr double MemcpyGoogleD[] = {
#include "distributions/MemcpyGoogleD.csv"
};
static constexpr double MemcpyGoogleB[] = {
#include "distributions/MemcpyGoogleB.csv"
};
static constexpr double MemcpyGoogleQ[] = {
#include "distributions/MemcpyGoogleQ.csv"
};
static constexpr double MemcpyGoogleL[] = {
#include "distributions/MemcpyGoogleL.csv"
};
static constexpr double MemcpyGoogleM[] = {
#include "distributions/MemcpyGoogleM.csv"
};
static constexpr double MemcpyGoogleS[] = {
#include "distributions/MemcpyGoogleS.csv"
};
static constexpr double MemcpyGoogleW[] = {
#include "distributions/MemcpyGoogleW.csv"
};
static constexpr double MemcpyGoogleU[] = {
#include "distributions/MemcpyGoogleU.csv"
};
static constexpr double MemsetGoogleA[] = {
#include "distributions/MemsetGoogleA.csv"
};
static constexpr double MemsetGoogleB[] = {
#include "distributions/MemsetGoogleB.csv"
};
static constexpr double MemsetGoogleD[] = {
#include "distributions/MemsetGoogleD.csv"
};
static constexpr double MemsetGoogleQ[] = {
#include "distributions/MemsetGoogleQ.csv"
};
static constexpr double MemsetGoogleL[] = {
#include "distributions/MemsetGoogleL.csv"
};
static constexpr double MemsetGoogleM[] = {
#include "distributions/MemsetGoogleM.csv"
};
static constexpr double MemsetGoogleS[] = {
#include "distributions/MemsetGoogleS.csv"
};
static constexpr double MemsetGoogleW[] = {
#include "distributions/MemsetGoogleW.csv"
};
static constexpr double MemsetGoogleU[] = {
#include "distributions/MemsetGoogleU.csv"
};
static constexpr double Uniform384To4096[] = {
#include "distributions/Uniform384To4096.csv"
};

ArrayRef<MemorySizeDistribution> getMemcpySizeDistributions() {
  static constexpr MemorySizeDistribution kDistributions[] = {
      {"memcpy Google A", MemcpyGoogleA},
      {"memcpy Google B", MemcpyGoogleB},
      {"memcpy Google D", MemcpyGoogleD},
      {"memcpy Google L", MemcpyGoogleL},
      {"memcpy Google M", MemcpyGoogleM},
      {"memcpy Google Q", MemcpyGoogleQ},
      {"memcpy Google S", MemcpyGoogleS},
      {"memcpy Google U", MemcpyGoogleU},
      {"memcpy Google W", MemcpyGoogleW},
      {"uniform 384 to 4096", Uniform384To4096},
  };
  return kDistributions;
}

ArrayRef<MemorySizeDistribution> getMemsetSizeDistributions() {
  static constexpr MemorySizeDistribution kDistributions[] = {
      {"memset Google A", MemsetGoogleA},
      {"memset Google B", MemsetGoogleB},
      {"memset Google D", MemsetGoogleD},
      {"memset Google L", MemsetGoogleL},
      {"memset Google M", MemsetGoogleM},
      {"memset Google Q", MemsetGoogleQ},
      {"memset Google S", MemsetGoogleS},
      {"memset Google U", MemsetGoogleU},
      {"memset Google W", MemsetGoogleW},
      {"uniform 384 to 4096", Uniform384To4096},
  };
  return kDistributions;
}

ArrayRef<MemorySizeDistribution> getMemcmpSizeDistributions() {
  static constexpr MemorySizeDistribution kDistributions[] = {
      {"memcmp Google A", MemcmpGoogleA},
      {"memcmp Google B", MemcmpGoogleB},
      {"memcmp Google D", MemcmpGoogleD},
      {"memcmp Google L", MemcmpGoogleL},
      {"memcmp Google M", MemcmpGoogleM},
      {"memcmp Google Q", MemcmpGoogleQ},
      {"memcmp Google S", MemcmpGoogleS},
      {"memcmp Google U", MemcmpGoogleU},
      {"memcmp Google W", MemcmpGoogleW},
      {"uniform 384 to 4096", Uniform384To4096},
  };
  return kDistributions;
}
} // namespace libc_benchmarks
} // namespace llvm