| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Reland "[libc] Add {,r}index" Differential Revision: https://reviews.llvm.org/D147464 | 3 年前 | |
[libc] Add qsort_r This patch adds the reentrent qsort entrypoint, qsort_r. This is done by extending the qsort functionality and moving it to a shared utility header. For this reason the qsort_r tests focus mostly on the places where it differs from qsort, since they share the same sorting code. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D152467 | 3 年前 | |
[libc] Add basic support for calling host functions from the GPU This patch adds the rpc_host_call function as a GPU extension. This is exported from the libc project to use the RPC interface to call a function pointer via RPC any copying the arguments by-value. The interface can only support a single void pointer argument much like pthreads. The function call here is the bare-bones version of what's required for OpenMP reverse offloading. Full support will require interfacing with the mapping table, nowait support, etc. I decided to test this interface in libomptarget as that will be the primary consumer and it would be more difficult to make a test in libc due to the testing infrastructure not really having a concept of the "host" as it runs directly on the GPU as if it were a CPU target. Reviewed By: jplehr Differential Revision: https://reviews.llvm.org/D155003 | 2 年前 | |
[libc] add socket function This patch adds the function "socket" from the header "sys/socket". It's a simple syscall wrapper, and I plan on adding the related functions in a followup patch. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149622 | 3 年前 | |
[libc] Move b* string functions to strings.h Traditionally these functions are exposed in string*s*.h not string.h Differential Revision: https://reviews.llvm.org/D141237 | 3 年前 | |
[libc] Fix argument types for {f,}truncate specs The current argument types are currently switched around for ftruncate and truncate. Currently passes tests because the internal definitions inside the __llvm_libc namespace are fine. Reviewed By: michaelrj, thesamesam, sivachandra Differential Revision: https://reviews.llvm.org/D152664 | 3 年前 | |
[libc][obvious] remove currently unused types Somehow having MBState and StructTmType in the definition for wchar was causing test failures. This should fix those. Differential Revision: https://reviews.llvm.org/D146476 | 3 年前 | |
[libc][math] Implement erff function correctly rounded to all rounding modes. Implement correctly rounded erff functions. For x >= 4, erff(x) = 1 for FE_TONEAREST or FE_UPWARD, 0x1.ffffep-1 for FE_DOWNWARD or FE_TOWARDZERO. For 0 <= x < 4, we divide into 32 sub-intervals of length 1/8, and use a degree-15 odd polynomial to approximate erff(x) in each sub-interval: erff(x) ~ x * (c0 + c1 * x^2 + c2 * x^4 + ... + c7 * x^14). For x < 0, we can use the same formula as above, since the odd part is factored out. Performance tested with perf.sh tool from the CORE-MATH project on AMD Ryzen 9 5900X: Reciprocal throughput (clock cycles / op) $ ./perf.sh erff --path2 GNU libc version: 2.35 GNU libc release: stable -- CORE-MATH reciprocal throughput -- with -march=native (with FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 11.790 + 0.182 clc/call; Median-Min = 0.154 clc/call; Max = 12.255 clc/call; -- CORE-MATH reciprocal throughput -- with -march=x86-64-v2 (without FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 14.205 + 0.151 clc/call; Median-Min = 0.159 clc/call; Max = 15.893 clc/call; -- System LIBC reciprocal throughput -- [####################] 100 % Ntrial = 20 ; Min = 45.519 + 0.445 clc/call; Median-Min = 0.552 clc/call; Max = 46.345 clc/call; -- LIBC reciprocal throughput -- with -mavx2 -mfma (with FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 9.595 + 0.214 clc/call; Median-Min = 0.220 clc/call; Max = 9.887 clc/call; -- LIBC reciprocal throughput -- with -msse4.2 (without FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 10.223 + 0.190 clc/call; Median-Min = 0.222 clc/call; Max = 10.474 clc/call; and latency (clock cycles / op): $ ./perf.sh erff --path2 GNU libc version: 2.35 GNU libc release: stable -- CORE-MATH latency -- with -march=native (with FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 38.566 + 0.391 clc/call; Median-Min = 0.503 clc/call; Max = 39.170 clc/call; -- CORE-MATH latency -- with -march=x86-64-v2 (without FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 43.223 + 0.667 clc/call; Median-Min = 0.680 clc/call; Max = 43.913 clc/call; -- System LIBC latency -- [####################] 100 % Ntrial = 20 ; Min = 111.613 + 1.267 clc/call; Median-Min = 1.696 clc/call; Max = 113.444 clc/call; -- LIBC latency -- with -mavx2 -mfma (with FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 40.138 + 0.410 clc/call; Median-Min = 0.536 clc/call; Max = 40.729 clc/call; -- LIBC latency -- with -msse4.2 (without FMA instructions) [####################] 100 % Ntrial = 20 ; Min = 44.858 + 0.872 clc/call; Median-Min = 0.814 clc/call; Max = 46.019 clc/call; Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D153683 | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 |