COLD unsigned dav1d_get_cpu_flags_arm(void) { unsigned flags = dav1d_get_default_cpu_flags(); if (have_feature("hw.optional.arm.FEAT_DotProd"))
flags |= DAV1D_ARM_CPU_FLAG_DOTPROD; if (have_feature("hw.optional.arm.FEAT_I8MM"))
flags |= DAV1D_ARM_CPU_FLAG_I8MM; /* No SVE and SVE2 feature detection available on Apple platforms. */ return flags;
}
COLD unsigned dav1d_get_cpu_flags_arm(void) { unsigned flags = dav1d_get_default_cpu_flags(); #ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
flags |= DAV1D_ARM_CPU_FLAG_DOTPROD; #endif #ifdef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE if (IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE))
flags |= DAV1D_ARM_CPU_FLAG_SVE; #endif #ifdef PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE if (IsProcessorFeaturePresent(PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE))
flags |= DAV1D_ARM_CPU_FLAG_SVE2; #endif #ifdef PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE /* There's no PF_* flag that indicates whether plain I8MM is available * or not. But if SVE_I8MM is available, that also implies that
* regular I8MM is available. */ if (IsProcessorFeaturePresent(PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE))
flags |= DAV1D_ARM_CPU_FLAG_I8MM; #endif return flags;
}
size_t flaglen = strlen(flag); while ((line = fgets(line_buffer, sizeof(line_buffer), file))) { // check all occurances as whole words constchar *found = line; while ((found = strstr(found, flag))) { if ((found == line_buffer || !isgraph(found[-1])) &&
(isspace(found[flaglen]) || feof(file))) {
fclose(file); return 1;
}
found += flaglen;
} // if line is incomplete seek back to avoid splitting the search // string into two buffers if (!strchr(line, '\n') && strlen(line) > flaglen) { // use fseek since the 64 bit fseeko is only available since // Android API level 24 and meson defines _FILE_OFFSET_BITS // by default 64 if (fseek(file, -flaglen, SEEK_CUR)) break;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.