/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/lit-tests/dispatch_llvm20plus.ispc
46 строк
1 KB
Ivan Kelarev
Replace dots with underscores in avx10.2dmr target function suffix
30 янв 2026, 00:46
30 янв 2026, 00:46
c5eb16e
Код
Авторство
О чём код?
// RUN: %{ispc} --pic --target=sse2-i32x4,avx10.2dmr-x4 -h %t.h %s -o %t.o -g // RUN: %{cc} -x c -c %s -o %t.c.o --include %t.h -g // RUN: %{cc} %t.c.o -o %t.c.bin -g -rdynamic %t.o %t_sse2.o %t_avx10_2dmr.o // RUN: sde -mrm -- %t.c.bin | FileCheck %s --check-prefix=CHECK-SSE2 // RUN: sde -dmr -- %t.c.bin | FileCheck %s --check-prefix=CHECK-DMR // REQUIRES: LINUX_HOST && X86_ENABLED && SDE_INSTALLED && LLVM_20_0+ // CHECK-SSE2: ispc_foo_sse2 // CHECK-DMR: ispc_foo_avx10_2dmr #ifdef ISPC extern "C" void print_stack_trace(); void check_isa() { print_stack_trace(); print("check_isa"); } export void ispc_foo() { check_isa(); } #else #include <execinfo.h> #include <stdio.h> #include <stdlib.h> void print_stack_trace() { const int max_frames = 64; void *buffer[max_frames]; int num_frames = backtrace(buffer, max_frames); char **symbols = backtrace_symbols(buffer, num_frames); if (symbols == NULL) { perror("backtrace_symbols"); exit(EXIT_FAILURE); } printf("Stack trace:\n"); for (int i = 0; i < num_frames; i++) { printf("%s\n", symbols[i]); } free(symbols); } extern void ispc_foo(); int main() { ispc_foo(); return 0; } #endif // ISPC