mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
remove user defined warnings, remove win icc ci
This commit is contained in:
parent
bfd561805b
commit
46e1d70551
71
.github/workflows/win-icc.yml
vendored
71
.github/workflows/win-icc.yml
vendored
@ -1,71 +0,0 @@
|
|||||||
name: win-icc-ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- feature/**
|
|
||||||
- improvement/**
|
|
||||||
- bugfix/**
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- feature/**
|
|
||||||
- improvement/**
|
|
||||||
- bugfix/**
|
|
||||||
|
|
||||||
env:
|
|
||||||
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17453/w_BaseKit_p_2021.1.0.2664_offline.exe
|
|
||||||
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
icc_tests:
|
|
||||||
if: >-
|
|
||||||
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
|
|
||||||
! contains(toJSON(github.event.commits.*.message), '[skip github]')
|
|
||||||
|
|
||||||
runs-on: windows-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: cache install
|
|
||||||
id: cache-install
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: C:\Program Files (x86)\Intel\oneAPI\compiler
|
|
||||||
key: >-
|
|
||||||
install-${{ env.WINDOWS_HPCKIT_URL }}-
|
|
||||||
${{ env.WINDOWS_CPP_COMPONENTS }}-
|
|
||||||
compiler-${{ hashFiles('**/script/cache_exclude_windows.sh') }}
|
|
||||||
|
|
||||||
- name: Install icc
|
|
||||||
run: >-
|
|
||||||
script/ci_win_install_icc.bat $WINDOWS_HPCKIT_URL
|
|
||||||
$WINDOWS_CPP_COMPONENTS
|
|
||||||
|
|
||||||
- name: CMake
|
|
||||||
run: echo "/host_usr_local/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: script/ci_install_deps.sh
|
|
||||||
|
|
||||||
- name: Setup icc
|
|
||||||
run: script/ci_win_setup_icc.bat
|
|
||||||
|
|
||||||
- name: Configure
|
|
||||||
run: >-
|
|
||||||
dpcpp -v &&
|
|
||||||
cmake -DCMAKE_CXX_COMPILER=dpcpp -S test -B build
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: >-
|
|
||||||
cmake --build build -j ${{ steps.cores.outputs.count }}
|
|
||||||
|
|
||||||
- name: Run
|
|
||||||
working-directory: build
|
|
||||||
run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }}
|
|
@ -1,5 +1,6 @@
|
|||||||
# Static split parser
|
# Static split parser
|
||||||
|
|
||||||
|
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
|
||||||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
|
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
A header only "csv" parser which is fast and versatile with modern C++ api. Requires compiler with C++17 support.
|
A header only "csv" parser which is fast and versatile with modern C++ api. Requires compiler with C++17 support.
|
||||||
|
@ -18,11 +18,11 @@ namespace ss {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::enable_if_t<std::is_floating_point_v<T>, std::optional<T>> to_num(
|
std::enable_if_t<std::is_floating_point_v<T>, std::optional<T>> to_num(
|
||||||
const char* begin, const char* const end) {
|
const char* const begin, const char* const end) {
|
||||||
T ret;
|
T ret;
|
||||||
auto answer = fast_float::from_chars(begin, end, ret);
|
auto [ptr, ec] = fast_float::from_chars(begin, end, ret);
|
||||||
|
|
||||||
if (answer.ec != std::errc() || answer.ptr != end) {
|
if (ec != std::errc() || ptr != end) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -169,13 +169,6 @@ bool shift_and_add_overflow(T& value, T digit, F add_last_digit_owerflow) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef SS_NO_WARNINGS
|
|
||||||
#ifdef _WIN32
|
|
||||||
#pragma warning("Use clang or gcc if possible for performance reasons. Define SS_NO_WARNINGS to supress warning.")
|
|
||||||
#else
|
|
||||||
#warning "Use clang or gcc if possible for performance reasons. Define SS_NO_WARNINGS to supress warning."
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
bool shift_and_add_overflow(T& value, T digit, U is_negative) {
|
bool shift_and_add_overflow(T& value, T digit, U is_negative) {
|
||||||
digit = (is_negative) ? -digit : digit;
|
digit = (is_negative) ? -digit : digit;
|
||||||
|
Loading…
Reference in New Issue
Block a user