Delete fnptr-global-array.md with huggingface_hub
Browse files- fnptr-global-array.md +0 -430
fnptr-global-array.md
DELETED
|
@@ -1,430 +0,0 @@
|
|
| 1 |
-
# Example 1
|
| 2 |
-
|
| 3 |
-
## Callsite
|
| 4 |
-
|
| 5 |
-
*/home/yuanting/work/icall-benchmarks/llm/zfs-build/../zfs-2.2.2/cmd/zdb/zdb.c:3803:4*
|
| 6 |
-
|
| 7 |
-
fnptr: *object_viewer[ZDB_OT_TYPE(doi.doi_bonus_type)]*
|
| 8 |
-
|
| 9 |
-
targets: dump_acl, dump_bpobj, dump_bpobj_subobjs, dump_ddt_zap, dump_dmu_objset, dump_dnode, dump_dsl_dataset, dump_dsl_dir, dump_history_offsets, dump_none, dump_packed_nvlist, dump_sa_attrs, dump_sa_layouts, dump_uint64, dump_uint8, dump_unknown, dump_zap, dump_znode, dump_zpldir
|
| 10 |
-
|
| 11 |
-
## Related Code Snippets
|
| 12 |
-
|
| 13 |
-
```c
|
| 14 |
-
static void
|
| 15 |
-
dump_object(objset_t *os, uint64_t object, int verbosity,
|
| 16 |
-
boolean_t *print_header, uint64_t *dnode_slots_used, uint64_t flags)
|
| 17 |
-
{
|
| 18 |
-
if (!dnode_held) {
|
| 19 |
-
object_viewer[ZDB_OT_TYPE(doi.doi_bonus_type)](os,
|
| 20 |
-
object, bonus, bsize);
|
| 21 |
-
} else {
|
| 22 |
-
(void) printf("\t\t(bonus encrypted)\n");
|
| 23 |
-
}
|
| 24 |
-
}
|
| 25 |
-
```
|
| 26 |
-
|
| 27 |
-
```c
|
| 28 |
-
static object_viewer_t *object_viewer[DMU_OT_NUMTYPES + 1] = {
|
| 29 |
-
dump_none, /* unallocated */
|
| 30 |
-
dump_zap, /* object directory */
|
| 31 |
-
dump_uint64, /* object array */
|
| 32 |
-
dump_none, /* packed nvlist */
|
| 33 |
-
dump_packed_nvlist, /* packed nvlist size */
|
| 34 |
-
dump_none, /* bpobj */
|
| 35 |
-
dump_bpobj, /* bpobj header */
|
| 36 |
-
dump_none, /* SPA space map header */
|
| 37 |
-
dump_none, /* SPA space map */
|
| 38 |
-
dump_none, /* ZIL intent log */
|
| 39 |
-
dump_dnode, /* DMU dnode */
|
| 40 |
-
dump_dmu_objset, /* DMU objset */
|
| 41 |
-
dump_dsl_dir, /* DSL directory */
|
| 42 |
-
dump_zap, /* DSL directory child map */
|
| 43 |
-
dump_zap, /* DSL dataset snap map */
|
| 44 |
-
dump_zap, /* DSL props */
|
| 45 |
-
dump_dsl_dataset, /* DSL dataset */
|
| 46 |
-
dump_znode, /* ZFS znode */
|
| 47 |
-
dump_acl, /* ZFS V0 ACL */
|
| 48 |
-
dump_uint8, /* ZFS plain file */
|
| 49 |
-
dump_zpldir, /* ZFS directory */
|
| 50 |
-
dump_zap, /* ZFS master node */
|
| 51 |
-
dump_zap, /* ZFS delete queue */
|
| 52 |
-
dump_uint8, /* zvol object */
|
| 53 |
-
dump_zap, /* zvol prop */
|
| 54 |
-
dump_uint8, /* other uint8[] */
|
| 55 |
-
dump_uint64, /* other uint64[] */
|
| 56 |
-
dump_zap, /* other ZAP */
|
| 57 |
-
dump_zap, /* persistent error log */
|
| 58 |
-
dump_uint8, /* SPA history */
|
| 59 |
-
dump_history_offsets, /* SPA history offsets */
|
| 60 |
-
dump_zap, /* Pool properties */
|
| 61 |
-
dump_zap, /* DSL permissions */
|
| 62 |
-
dump_acl, /* ZFS ACL */
|
| 63 |
-
dump_uint8, /* ZFS SYSACL */
|
| 64 |
-
dump_none, /* FUID nvlist */
|
| 65 |
-
dump_packed_nvlist, /* FUID nvlist size */
|
| 66 |
-
dump_zap, /* DSL dataset next clones */
|
| 67 |
-
dump_zap, /* DSL scrub queue */
|
| 68 |
-
dump_zap, /* ZFS user/group/project used */
|
| 69 |
-
dump_zap, /* ZFS user/group/project quota */
|
| 70 |
-
dump_zap, /* snapshot refcount tags */
|
| 71 |
-
dump_ddt_zap, /* DDT ZAP object */
|
| 72 |
-
dump_zap, /* DDT statistics */
|
| 73 |
-
dump_znode, /* SA object */
|
| 74 |
-
dump_zap, /* SA Master Node */
|
| 75 |
-
dump_sa_attrs, /* SA attribute registration */
|
| 76 |
-
dump_sa_layouts, /* SA attribute layouts */
|
| 77 |
-
dump_zap, /* DSL scrub translations */
|
| 78 |
-
dump_none, /* fake dedup BP */
|
| 79 |
-
dump_zap, /* deadlist */
|
| 80 |
-
dump_none, /* deadlist hdr */
|
| 81 |
-
dump_zap, /* dsl clones */
|
| 82 |
-
dump_bpobj_subobjs, /* bpobj subobjs */
|
| 83 |
-
dump_unknown, /* Unknown type, must be last */
|
| 84 |
-
};
|
| 85 |
-
```
|
| 86 |
-
|
| 87 |
-
# Example 2
|
| 88 |
-
|
| 89 |
-
## Callsite
|
| 90 |
-
|
| 91 |
-
*/home/yuanting/work/icall-benchmarks/llm/ffmpeg-6.1.1/libavcodec/aaccoder.c:284:5*
|
| 92 |
-
|
| 93 |
-
fnptr: *quantize_and_encode_band_cost_rtz_arr : quantize_and_encode_band_cost_arr)[cb]*
|
| 94 |
-
|
| 95 |
-
targets: quantize_and_encode_band_cost_ZERO, quantize_and_encode_band_cost_SQUAD, quantize_and_encode_band_cost_UQUAD, quantize_and_encode_band_cost_SPAIR, quantize_and_encode_band_cost_UPAIR, quantize_and_encode_band_cost_ESC, quantize_and_encode_band_cost_NONE, quantize_and_encode_band_cost_NOISE, quantize_and_encode_band_cost_STEREO, quantize_and_encode_band_cost_ESC_RTZ
|
| 96 |
-
|
| 97 |
-
## Related Code Snippets
|
| 98 |
-
|
| 99 |
-
```c
|
| 100 |
-
static inline void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb,
|
| 101 |
-
const float *in, float *out, int size, int scale_idx,
|
| 102 |
-
int cb, const float lambda, int rtz)
|
| 103 |
-
{
|
| 104 |
-
(rtz ? quantize_and_encode_band_cost_rtz_arr : quantize_and_encode_band_cost_arr)[cb](s, pb, in, out, NULL, size, scale_idx, cb,
|
| 105 |
-
lambda, INFINITY, NULL, NULL);
|
| 106 |
-
}
|
| 107 |
-
```
|
| 108 |
-
|
| 109 |
-
```c
|
| 110 |
-
static const quantize_and_encode_band_func quantize_and_encode_band_cost_arr[] =
|
| 111 |
-
{
|
| 112 |
-
quantize_and_encode_band_cost_ZERO,
|
| 113 |
-
quantize_and_encode_band_cost_SQUAD,
|
| 114 |
-
quantize_and_encode_band_cost_SQUAD,
|
| 115 |
-
quantize_and_encode_band_cost_UQUAD,
|
| 116 |
-
quantize_and_encode_band_cost_UQUAD,
|
| 117 |
-
quantize_and_encode_band_cost_SPAIR,
|
| 118 |
-
quantize_and_encode_band_cost_SPAIR,
|
| 119 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 120 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 121 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 122 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 123 |
-
quantize_and_encode_band_cost_ESC,
|
| 124 |
-
quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */
|
| 125 |
-
quantize_and_encode_band_cost_NOISE,
|
| 126 |
-
quantize_and_encode_band_cost_STEREO,
|
| 127 |
-
quantize_and_encode_band_cost_STEREO,
|
| 128 |
-
};
|
| 129 |
-
|
| 130 |
-
static const quantize_and_encode_band_func quantize_and_encode_band_cost_rtz_arr[] =
|
| 131 |
-
{
|
| 132 |
-
quantize_and_encode_band_cost_ZERO,
|
| 133 |
-
quantize_and_encode_band_cost_SQUAD,
|
| 134 |
-
quantize_and_encode_band_cost_SQUAD,
|
| 135 |
-
quantize_and_encode_band_cost_UQUAD,
|
| 136 |
-
quantize_and_encode_band_cost_UQUAD,
|
| 137 |
-
quantize_and_encode_band_cost_SPAIR,
|
| 138 |
-
quantize_and_encode_band_cost_SPAIR,
|
| 139 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 140 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 141 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 142 |
-
quantize_and_encode_band_cost_UPAIR,
|
| 143 |
-
quantize_and_encode_band_cost_ESC_RTZ,
|
| 144 |
-
quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */
|
| 145 |
-
quantize_and_encode_band_cost_NOISE,
|
| 146 |
-
quantize_and_encode_band_cost_STEREO,
|
| 147 |
-
quantize_and_encode_band_cost_STEREO,
|
| 148 |
-
};
|
| 149 |
-
```
|
| 150 |
-
|
| 151 |
-
# Example 3
|
| 152 |
-
|
| 153 |
-
## Callsite
|
| 154 |
-
|
| 155 |
-
*/home/yuanting/work/icall-benchmarks/llm/ffmpeg-6.1.1/libavcodec/ass_split.c:329:25*
|
| 156 |
-
|
| 157 |
-
fnptr: *convert_func[type]*
|
| 158 |
-
|
| 159 |
-
targets: convert_str, convert_int, convert_flt, convert_color, convert_timestamp, convert_alignment
|
| 160 |
-
|
| 161 |
-
## Related Code Snippets
|
| 162 |
-
|
| 163 |
-
```c
|
| 164 |
-
static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
|
| 165 |
-
{
|
| 166 |
-
const ASSSection *section = &ass_sections[ctx->current_section];
|
| 167 |
-
int *number = &ctx->field_number[ctx->current_section];
|
| 168 |
-
int *order = ctx->field_order[ctx->current_section];
|
| 169 |
-
int i, len;
|
| 170 |
-
|
| 171 |
-
while (buf && *buf) {
|
| 172 |
-
...
|
| 173 |
-
buf += len + 1;
|
| 174 |
-
for (i=0; !is_eol(*buf) && i < *number; i++) {
|
| 175 |
-
int last = i == *number - 1;
|
| 176 |
-
buf = skip_space(buf);
|
| 177 |
-
len = strcspn(buf, last ? "\r\n" : ",\r\n");
|
| 178 |
-
if (order[i] >= 0) {
|
| 179 |
-
ASSFieldType type = section->fields[order[i]].type;
|
| 180 |
-
ptr = struct_ptr + section->fields[order[i]].offset;
|
| 181 |
-
convert_func[type](ptr, buf, len);
|
| 182 |
-
}
|
| 183 |
-
buf += len;
|
| 184 |
-
if (!last && *buf) buf++;
|
| 185 |
-
buf = skip_space(buf);
|
| 186 |
-
}
|
| 187 |
-
}
|
| 188 |
-
...
|
| 189 |
-
return buf;
|
| 190 |
-
}
|
| 191 |
-
```
|
| 192 |
-
|
| 193 |
-
```c
|
| 194 |
-
static const ASSConvertFunc convert_func[] = {
|
| 195 |
-
[ASS_STR] = convert_str,
|
| 196 |
-
[ASS_INT] = convert_int,
|
| 197 |
-
[ASS_FLT] = convert_flt,
|
| 198 |
-
[ASS_COLOR] = convert_color,
|
| 199 |
-
[ASS_TIMESTAMP] = convert_timestamp,
|
| 200 |
-
[ASS_ALGN] = convert_alignment,
|
| 201 |
-
};
|
| 202 |
-
```
|
| 203 |
-
|
| 204 |
-
# Example 4
|
| 205 |
-
|
| 206 |
-
## Callsite
|
| 207 |
-
|
| 208 |
-
*/home/yuanting/work/icall-benchmarks/llm/ffmpeg-6.1.1/libavcodec/exr.c:2241:19*
|
| 209 |
-
|
| 210 |
-
fnptr: *trc_func*
|
| 211 |
-
|
| 212 |
-
targets: trc_bt709, trc_gamma22, trc_gamma28, trc_smpte240M, trc_linear, trc_log, trc_log_sqrt, trc_iec61966_2_4, trc_bt1361, trc_iec61966_2_1, trc_smpte_st2084, trc_smpte_st428_1, trc_arib_std_b67
|
| 213 |
-
|
| 214 |
-
## Related Code Snippets
|
| 215 |
-
|
| 216 |
-
```c
|
| 217 |
-
static av_cold int decode_init(AVCodecContext *avctx)
|
| 218 |
-
{
|
| 219 |
-
EXRContext *s = avctx->priv_data;
|
| 220 |
-
...
|
| 221 |
-
av_csp_trc_function trc_func = NULL;
|
| 222 |
-
|
| 223 |
-
ff_init_half2float_tables(&s->h2f_tables);
|
| 224 |
-
|
| 225 |
-
s->avctx = avctx;
|
| 226 |
-
|
| 227 |
-
ff_exrdsp_init(&s->dsp);
|
| 228 |
-
...
|
| 229 |
-
|
| 230 |
-
trc_func = av_csp_trc_func_from_id(s->apply_trc_type);
|
| 231 |
-
if (trc_func) {
|
| 232 |
-
for (i = 0; i < 65536; ++i) {
|
| 233 |
-
t.i = half2float(i, &s->h2f_tables);
|
| 234 |
-
t.f = trc_func(t.f);
|
| 235 |
-
s->gamma_table[i] = t;
|
| 236 |
-
}
|
| 237 |
-
...
|
| 238 |
-
}
|
| 239 |
-
}
|
| 240 |
-
```
|
| 241 |
-
|
| 242 |
-
```c
|
| 243 |
-
static const av_csp_trc_function trc_funcs[AVCOL_TRC_NB] = {
|
| 244 |
-
[AVCOL_TRC_BT709] = trc_bt709,
|
| 245 |
-
[AVCOL_TRC_GAMMA22] = trc_gamma22,
|
| 246 |
-
[AVCOL_TRC_GAMMA28] = trc_gamma28,
|
| 247 |
-
[AVCOL_TRC_SMPTE170M] = trc_bt709,
|
| 248 |
-
[AVCOL_TRC_SMPTE240M] = trc_smpte240M,
|
| 249 |
-
[AVCOL_TRC_LINEAR] = trc_linear,
|
| 250 |
-
[AVCOL_TRC_LOG] = trc_log,
|
| 251 |
-
[AVCOL_TRC_LOG_SQRT] = trc_log_sqrt,
|
| 252 |
-
[AVCOL_TRC_IEC61966_2_4] = trc_iec61966_2_4,
|
| 253 |
-
[AVCOL_TRC_BT1361_ECG] = trc_bt1361,
|
| 254 |
-
[AVCOL_TRC_IEC61966_2_1] = trc_iec61966_2_1,
|
| 255 |
-
[AVCOL_TRC_BT2020_10] = trc_bt709,
|
| 256 |
-
[AVCOL_TRC_BT2020_12] = trc_bt709,
|
| 257 |
-
[AVCOL_TRC_SMPTE2084] = trc_smpte_st2084,
|
| 258 |
-
[AVCOL_TRC_SMPTE428] = trc_smpte_st428_1,
|
| 259 |
-
[AVCOL_TRC_ARIB_STD_B67] = trc_arib_std_b67,
|
| 260 |
-
};
|
| 261 |
-
|
| 262 |
-
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc)
|
| 263 |
-
{
|
| 264 |
-
av_csp_trc_function func;
|
| 265 |
-
if (trc >= AVCOL_TRC_NB)
|
| 266 |
-
return NULL;
|
| 267 |
-
func = trc_funcs[trc];
|
| 268 |
-
if (!func)
|
| 269 |
-
return NULL;
|
| 270 |
-
return func;
|
| 271 |
-
}
|
| 272 |
-
```
|
| 273 |
-
|
| 274 |
-
# Example 5
|
| 275 |
-
|
| 276 |
-
## Callsite
|
| 277 |
-
|
| 278 |
-
*/home/yuanting/work/icall-benchmarks/llm/curl-build/lib/../../curl-8.5.0/lib/multi.c:196:5*
|
| 279 |
-
|
| 280 |
-
fnptr: *finit[state]*
|
| 281 |
-
|
| 282 |
-
targets: Curl_init_CONNECT, before_perform, init_completed
|
| 283 |
-
|
| 284 |
-
## Related Code Snippets
|
| 285 |
-
|
| 286 |
-
```c
|
| 287 |
-
/* always use this function to change state, to make debugging easier */
|
| 288 |
-
static void mstate(struct Curl_easy *data, CURLMstate state
|
| 289 |
-
#ifdef DEBUGBUILD
|
| 290 |
-
, int lineno
|
| 291 |
-
#endif
|
| 292 |
-
)
|
| 293 |
-
{
|
| 294 |
-
CURLMstate oldstate = data->mstate;
|
| 295 |
-
static const init_multistate_func finit[MSTATE_LAST] = {
|
| 296 |
-
NULL, /* INIT */
|
| 297 |
-
NULL, /* PENDING */
|
| 298 |
-
Curl_init_CONNECT, /* CONNECT */
|
| 299 |
-
NULL, /* RESOLVING */
|
| 300 |
-
NULL, /* CONNECTING */
|
| 301 |
-
NULL, /* TUNNELING */
|
| 302 |
-
NULL, /* PROTOCONNECT */
|
| 303 |
-
NULL, /* PROTOCONNECTING */
|
| 304 |
-
NULL, /* DO */
|
| 305 |
-
NULL, /* DOING */
|
| 306 |
-
NULL, /* DOING_MORE */
|
| 307 |
-
before_perform, /* DID */
|
| 308 |
-
NULL, /* PERFORMING */
|
| 309 |
-
NULL, /* RATELIMITING */
|
| 310 |
-
NULL, /* DONE */
|
| 311 |
-
init_completed, /* COMPLETED */
|
| 312 |
-
NULL /* MSGSENT */
|
| 313 |
-
};
|
| 314 |
-
...
|
| 315 |
-
/* if this state has an init-function, run it */
|
| 316 |
-
if(finit[state])
|
| 317 |
-
finit[state](data);
|
| 318 |
-
}
|
| 319 |
-
```
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
# Example 6
|
| 323 |
-
|
| 324 |
-
## Callsite
|
| 325 |
-
|
| 326 |
-
*/home/yuanting/work/icall-benchmarks/llm/zfs-build/../zfs-2.2.2/module/zfs/vdev_raidz_math_impl.h:1387:3*
|
| 327 |
-
|
| 328 |
-
fnptr: *gf_x1_mul_fns[c]*
|
| 329 |
-
|
| 330 |
-
targets: mul_x1_0, mul_x1_1, mul_x1_2, mul_x1_3, mul_x1_4, mul_x1_5, mul_x1_6, mul_x1_7, mul_x1_8, mul_x1_9, mul_x1_10, mul_x1_11, mul_x1_12, mul_x1_13, mul_x1_14, mul_x1_15, mul_x1_16, mul_x1_17, mul_x1_18, mul_x1_19, mul_x1_20, mul_x1_21, mul_x1_22, mul_x1_23, mul_x1_24, mul_x1_25, mul_x1_26, mul_x1_27, mul_x1_28, mul_x1_29, mul_x1_30, mul_x1_31, mul_x1_32, mul_x1_33, mul_x1_34, mul_x1_35, mul_x1_36, mul_x1_37, mul_x1_38, mul_x1_39, mul_x1_40, mul_x1_41, mul_x1_42, mul_x1_43, mul_x1_44, mul_x1_45, mul_x1_46, mul_x1_47, mul_x1_48, mul_x1_49, mul_x1_50, mul_x1_51, mul_x1_52, mul_x1_53, mul_x1_54, mul_x1_55, mul_x1_56, mul_x1_57, mul_x1_58, mul_x1_59, mul_x1_60, mul_x1_61, mul_x1_62, mul_x1_63, mul_x1_64, mul_x1_65, mul_x1_66, mul_x1_67, mul_x1_68, mul_x1_69, mul_x1_70, mul_x1_71, mul_x1_72, mul_x1_73, mul_x1_74, mul_x1_75, mul_x1_76, mul_x1_77, mul_x1_78, mul_x1_79, mul_x1_80, mul_x1_81, mul_x1_82, mul_x1_83, mul_x1_84, mul_x1_85, mul_x1_86, mul_x1_87, mul_x1_88, mul_x1_89, mul_x1_90, mul_x1_91, mul_x1_92, mul_x1_93, mul_x1_94, mul_x1_95, mul_x1_96, mul_x1_97, mul_x1_98, mul_x1_99, mul_x1_100, mul_x1_101, mul_x1_102, mul_x1_103, mul_x1_104, mul_x1_105, mul_x1_106, mul_x1_107, mul_x1_108, mul_x1_109, mul_x1_110, mul_x1_111, mul_x1_112, mul_x1_113, mul_x1_114, mul_x1_115, mul_x1_116, mul_x1_117, mul_x1_118, mul_x1_119, mul_x1_120, mul_x1_121, mul_x1_122, mul_x1_123, mul_x1_124, mul_x1_125, mul_x1_126, mul_x1_127, mul_x1_128, mul_x1_129, mul_x1_130, mul_x1_131, mul_x1_132, mul_x1_133, mul_x1_134, mul_x1_135, mul_x1_136, mul_x1_137, mul_x1_138, mul_x1_139, mul_x1_140, mul_x1_141, mul_x1_142, mul_x1_143, mul_x1_144, mul_x1_145, mul_x1_146, mul_x1_147, mul_x1_148, mul_x1_149, mul_x1_150, mul_x1_151, mul_x1_152, mul_x1_153, mul_x1_154, mul_x1_155, mul_x1_156, mul_x1_157, mul_x1_158, mul_x1_159, mul_x1_160, mul_x1_161, mul_x1_162, mul_x1_163, mul_x1_164, mul_x1_165, mul_x1_166, mul_x1_167, mul_x1_168, mul_x1_169, mul_x1_170, mul_x1_171, mul_x1_172, mul_x1_173, mul_x1_174, mul_x1_175, mul_x1_176, mul_x1_177, mul_x1_178, mul_x1_179, mul_x1_180, mul_x1_181, mul_x1_182, mul_x1_183, mul_x1_184, mul_x1_185, mul_x1_186, mul_x1_187, mul_x1_188, mul_x1_189, mul_x1_190, mul_x1_191, mul_x1_192, mul_x1_193, mul_x1_194, mul_x1_195, mul_x1_196, mul_x1_197, mul_x1_198, mul_x1_199, mul_x1_200, mul_x1_201, mul_x1_202, mul_x1_203, mul_x1_204, mul_x1_205, mul_x1_206, mul_x1_207, mul_x1_208, mul_x1_209, mul_x1_210, mul_x1_211, mul_x1_212, mul_x1_213, mul_x1_214, mul_x1_215, mul_x1_216, mul_x1_217, mul_x1_218, mul_x1_219, mul_x1_220, mul_x1_221, mul_x1_222, mul_x1_223, mul_x1_224, mul_x1_225, mul_x1_226, mul_x1_227, mul_x1_228, mul_x1_229, mul_x1_230, mul_x1_231, mul_x1_232, mul_x1_233, mul_x1_234, mul_x1_235, mul_x1_236, mul_x1_237, mul_x1_238, mul_x1_239, mul_x1_240, mul_x1_241, mul_x1_242, mul_x1_243, mul_x1_244, mul_x1_245, mul_x1_246, mul_x1_247, mul_x1_248, mul_x1_249, mul_x1_250, mul_x1_251, mul_x1_252, mul_x1_253, mul_x1_254, mul_x1_255
|
| 331 |
-
|
| 332 |
-
## Related Code Snippets
|
| 333 |
-
|
| 334 |
-
```c
|
| 335 |
-
static void
|
| 336 |
-
raidz_rec_pqr_abd(void **t, const size_t tsize, void **c,
|
| 337 |
-
const unsigned * const mul)
|
| 338 |
-
{
|
| 339 |
-
...
|
| 340 |
-
|
| 341 |
-
for (; x < xend; x += REC_PQR_STRIDE, y += REC_PQR_STRIDE,
|
| 342 |
-
z += REC_PQR_STRIDE, p += REC_PQR_STRIDE, q += REC_PQR_STRIDE,
|
| 343 |
-
r += REC_PQR_STRIDE) {
|
| 344 |
-
LOAD(x, REC_PQR_X);
|
| 345 |
-
LOAD(y, REC_PQR_Y);
|
| 346 |
-
LOAD(z, REC_PQR_Z);
|
| 347 |
-
|
| 348 |
-
XOR_ACC(p, REC_PQR_X);
|
| 349 |
-
XOR_ACC(q, REC_PQR_Y);
|
| 350 |
-
XOR_ACC(r, REC_PQR_Z);
|
| 351 |
-
|
| 352 |
-
/* Save Pxyz and Qxyz */
|
| 353 |
-
COPY(REC_PQR_X, REC_PQR_XS);
|
| 354 |
-
COPY(REC_PQR_Y, REC_PQR_YS);
|
| 355 |
-
|
| 356 |
-
/* Calc X */
|
| 357 |
-
MUL(mul[MUL_PQR_XP], REC_PQR_X); /* Xp = Pxyz * xp */
|
| 358 |
-
MUL(mul[MUL_PQR_XQ], REC_PQR_Y); /* Xq = Qxyz * xq */
|
| 359 |
-
...
|
| 360 |
-
}
|
| 361 |
-
...
|
| 362 |
-
}
|
| 363 |
-
```
|
| 364 |
-
|
| 365 |
-
```c
|
| 366 |
-
static const mul_fn_ptr_t __attribute__((aligned(256)))
|
| 367 |
-
gf_x1_mul_fns[256] = {
|
| 368 |
-
mul_x1_0, mul_x1_1, mul_x1_2, mul_x1_3, mul_x1_4, mul_x1_5,
|
| 369 |
-
mul_x1_6, mul_x1_7, mul_x1_8, mul_x1_9, mul_x1_10, mul_x1_11,
|
| 370 |
-
mul_x1_12, mul_x1_13, mul_x1_14, mul_x1_15, mul_x1_16, mul_x1_17,
|
| 371 |
-
mul_x1_18, mul_x1_19, mul_x1_20, mul_x1_21, mul_x1_22, mul_x1_23,
|
| 372 |
-
mul_x1_24, mul_x1_25, mul_x1_26, mul_x1_27, mul_x1_28, mul_x1_29,
|
| 373 |
-
mul_x1_30, mul_x1_31, mul_x1_32, mul_x1_33, mul_x1_34, mul_x1_35,
|
| 374 |
-
mul_x1_36, mul_x1_37, mul_x1_38, mul_x1_39, mul_x1_40, mul_x1_41,
|
| 375 |
-
mul_x1_42, mul_x1_43, mul_x1_44, mul_x1_45, mul_x1_46, mul_x1_47,
|
| 376 |
-
mul_x1_48, mul_x1_49, mul_x1_50, mul_x1_51, mul_x1_52, mul_x1_53,
|
| 377 |
-
mul_x1_54, mul_x1_55, mul_x1_56, mul_x1_57, mul_x1_58, mul_x1_59,
|
| 378 |
-
mul_x1_60, mul_x1_61, mul_x1_62, mul_x1_63, mul_x1_64, mul_x1_65,
|
| 379 |
-
mul_x1_66, mul_x1_67, mul_x1_68, mul_x1_69, mul_x1_70, mul_x1_71,
|
| 380 |
-
mul_x1_72, mul_x1_73, mul_x1_74, mul_x1_75, mul_x1_76, mul_x1_77,
|
| 381 |
-
mul_x1_78, mul_x1_79, mul_x1_80, mul_x1_81, mul_x1_82, mul_x1_83,
|
| 382 |
-
mul_x1_84, mul_x1_85, mul_x1_86, mul_x1_87, mul_x1_88, mul_x1_89,
|
| 383 |
-
mul_x1_90, mul_x1_91, mul_x1_92, mul_x1_93, mul_x1_94, mul_x1_95,
|
| 384 |
-
mul_x1_96, mul_x1_97, mul_x1_98, mul_x1_99, mul_x1_100, mul_x1_101,
|
| 385 |
-
mul_x1_102, mul_x1_103, mul_x1_104, mul_x1_105, mul_x1_106, mul_x1_107,
|
| 386 |
-
mul_x1_108, mul_x1_109, mul_x1_110, mul_x1_111, mul_x1_112, mul_x1_113,
|
| 387 |
-
mul_x1_114, mul_x1_115, mul_x1_116, mul_x1_117, mul_x1_118, mul_x1_119,
|
| 388 |
-
mul_x1_120, mul_x1_121, mul_x1_122, mul_x1_123, mul_x1_124, mul_x1_125,
|
| 389 |
-
mul_x1_126, mul_x1_127, mul_x1_128, mul_x1_129, mul_x1_130, mul_x1_131,
|
| 390 |
-
mul_x1_132, mul_x1_133, mul_x1_134, mul_x1_135, mul_x1_136, mul_x1_137,
|
| 391 |
-
mul_x1_138, mul_x1_139, mul_x1_140, mul_x1_141, mul_x1_142, mul_x1_143,
|
| 392 |
-
mul_x1_144, mul_x1_145, mul_x1_146, mul_x1_147, mul_x1_148, mul_x1_149,
|
| 393 |
-
mul_x1_150, mul_x1_151, mul_x1_152, mul_x1_153, mul_x1_154, mul_x1_155,
|
| 394 |
-
mul_x1_156, mul_x1_157, mul_x1_158, mul_x1_159, mul_x1_160, mul_x1_161,
|
| 395 |
-
mul_x1_162, mul_x1_163, mul_x1_164, mul_x1_165, mul_x1_166, mul_x1_167,
|
| 396 |
-
mul_x1_168, mul_x1_169, mul_x1_170, mul_x1_171, mul_x1_172, mul_x1_173,
|
| 397 |
-
mul_x1_174, mul_x1_175, mul_x1_176, mul_x1_177, mul_x1_178, mul_x1_179,
|
| 398 |
-
mul_x1_180, mul_x1_181, mul_x1_182, mul_x1_183, mul_x1_184, mul_x1_185,
|
| 399 |
-
mul_x1_186, mul_x1_187, mul_x1_188, mul_x1_189, mul_x1_190, mul_x1_191,
|
| 400 |
-
mul_x1_192, mul_x1_193, mul_x1_194, mul_x1_195, mul_x1_196, mul_x1_197,
|
| 401 |
-
mul_x1_198, mul_x1_199, mul_x1_200, mul_x1_201, mul_x1_202, mul_x1_203,
|
| 402 |
-
mul_x1_204, mul_x1_205, mul_x1_206, mul_x1_207, mul_x1_208, mul_x1_209,
|
| 403 |
-
mul_x1_210, mul_x1_211, mul_x1_212, mul_x1_213, mul_x1_214, mul_x1_215,
|
| 404 |
-
mul_x1_216, mul_x1_217, mul_x1_218, mul_x1_219, mul_x1_220, mul_x1_221,
|
| 405 |
-
mul_x1_222, mul_x1_223, mul_x1_224, mul_x1_225, mul_x1_226, mul_x1_227,
|
| 406 |
-
mul_x1_228, mul_x1_229, mul_x1_230, mul_x1_231, mul_x1_232, mul_x1_233,
|
| 407 |
-
mul_x1_234, mul_x1_235, mul_x1_236, mul_x1_237, mul_x1_238, mul_x1_239,
|
| 408 |
-
mul_x1_240, mul_x1_241, mul_x1_242, mul_x1_243, mul_x1_244, mul_x1_245,
|
| 409 |
-
mul_x1_246, mul_x1_247, mul_x1_248, mul_x1_249, mul_x1_250, mul_x1_251,
|
| 410 |
-
mul_x1_252, mul_x1_253, mul_x1_254, mul_x1_255
|
| 411 |
-
};
|
| 412 |
-
|
| 413 |
-
#define MUL(c, r...) \
|
| 414 |
-
{ \
|
| 415 |
-
switch (REG_CNT(r)) { \
|
| 416 |
-
case 2: \
|
| 417 |
-
COPY(r, _mul_x2_in); \
|
| 418 |
-
gf_x2_mul_fns[c](); \
|
| 419 |
-
COPY(_mul_x2_acc, r); \
|
| 420 |
-
break; \
|
| 421 |
-
case 1: \
|
| 422 |
-
COPY(r, _mul_x1_in); \
|
| 423 |
-
gf_x1_mul_fns[c](); \
|
| 424 |
-
COPY(_mul_x1_acc, r); \
|
| 425 |
-
break; \
|
| 426 |
-
default: \
|
| 427 |
-
VERIFY(0); \
|
| 428 |
-
} \
|
| 429 |
-
}
|
| 430 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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