OmniSciDB
0264ff685a
|
Go to the source code of this file.
Namespaces | |
anonymous_namespace{ExtractFromTime.cpp} | |
Functions | |
template<unsigned OFFSET> | |
DEVICE unsigned | anonymous_namespace{ExtractFromTime.cpp}::week_start_from_yoe (unsigned const yoe) |
ALWAYS_INLINE DEVICE int64_t | extract_hour (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_minute (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_second (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_millisecond (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_microsecond (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_nanosecond (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_dow (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_quarterday (const int64_t lcltime) |
DEVICE int32_t | extract_month_fast (const int64_t lcltime) |
DEVICE int32_t | extract_quarter_fast (const int64_t lcltime) |
DEVICE int32_t | extract_year_fast (const int64_t lcltime) |
ALWAYS_INLINE DEVICE int64_t | extract_epoch (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_dateepoch (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_isodow (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_day (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_day_of_year (const int64_t timeval) |
template<unsigned OFFSET> | |
ALWAYS_INLINE DEVICE int64_t | extract_week (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_week_monday (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_week_sunday (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_week_saturday (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_month (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_quarter (const int64_t timeval) |
ALWAYS_INLINE DEVICE int64_t | extract_year (const int64_t timeval) |
DEVICE int64_t | ExtractFromTime (ExtractField field, const int64_t timeval) |
Variables | |
constexpr unsigned | anonymous_namespace{ExtractFromTime.cpp}::MONDAY = 2 |
constexpr unsigned | anonymous_namespace{ExtractFromTime.cpp}::SUNDAY = 3 |
constexpr unsigned | anonymous_namespace{ExtractFromTime.cpp}::SATURDAY = 4 |
ALWAYS_INLINE DEVICE int64_t extract_dateepoch | ( | const int64_t | timeval | ) |
Definition at line 151 of file ExtractFromTime.cpp.
References kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_day | ( | const int64_t | timeval | ) |
Definition at line 161 of file ExtractFromTime.cpp.
References floor_div(), kDaysPer400Years, kEpochAdjustedDays, kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_day_of_year | ( | const int64_t | timeval | ) |
Definition at line 170 of file ExtractFromTime.cpp.
References floor_div(), JANMAR, kDaysPer400Years, kEpochAdjustedDays, kSecsPerDay, MARJAN, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_dow | ( | const int64_t | lcltime | ) |
Definition at line 73 of file ExtractFromTime.cpp.
References floor_div(), kDaysPerWeek, kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_epoch | ( | const int64_t | timeval | ) |
Definition at line 147 of file ExtractFromTime.cpp.
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_hour | ( | const int64_t | lcltime | ) |
Definition at line 48 of file ExtractFromTime.cpp.
References kSecsPerDay, kSecsPerHour, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_isodow | ( | const int64_t | timeval | ) |
Definition at line 156 of file ExtractFromTime.cpp.
References floor_div(), kDaysPerWeek, kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_microsecond | ( | const int64_t | lcltime | ) |
Definition at line 64 of file ExtractFromTime.cpp.
References kMicroSecsPerSec, kSecsPerMin, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_millisecond | ( | const int64_t | lcltime | ) |
Definition at line 60 of file ExtractFromTime.cpp.
References kMilliSecsPerSec, kSecsPerMin, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_minute | ( | const int64_t | lcltime | ) |
Definition at line 52 of file ExtractFromTime.cpp.
References kSecsPerHour, kSecsPerMin, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_month | ( | const int64_t | timeval | ) |
Definition at line 208 of file ExtractFromTime.cpp.
References extract_month_fast(), floor_div(), kDaysPer400Years, kEpochAdjustedDays, kEpochOffsetYear1900, kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
DEVICE int32_t extract_month_fast | ( | const int64_t | lcltime | ) |
Definition at line 82 of file ExtractFromTime.cpp.
References kEpochOffsetYear1900, kMonsPerYear, kSecondsPer4YearCycle, kSecondsPerNonLeapYear, kSecsJanToMar1900, kUSecsPerDay, and STATIC_QUAL.
Referenced by extract_month().
ALWAYS_INLINE DEVICE int64_t extract_nanosecond | ( | const int64_t | lcltime | ) |
Definition at line 68 of file ExtractFromTime.cpp.
References kNanoSecsPerSec, kSecsPerMin, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_quarter | ( | const int64_t | timeval | ) |
Definition at line 220 of file ExtractFromTime.cpp.
References extract_quarter_fast(), floor_div(), kDaysPer400Years, kEpochAdjustedDays, kEpochOffsetYear1900, kSecsPerDay, and unsigned_mod().
Referenced by ExtractFromTime().
DEVICE int32_t extract_quarter_fast | ( | const int64_t | lcltime | ) |
Definition at line 115 of file ExtractFromTime.cpp.
References kEpochOffsetYear1900, kSecondsPer4YearCycle, kSecondsPerNonLeapYear, kSecsJanToMar1900, kSecsPerDay, kUSecsPerDay, and STATIC_QUAL.
Referenced by extract_quarter().
ALWAYS_INLINE DEVICE int64_t extract_quarterday | ( | const int64_t | lcltime | ) |
Definition at line 78 of file ExtractFromTime.cpp.
References kSecsPerDay, kSecsPerQuarterDay, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_second | ( | const int64_t | lcltime | ) |
Definition at line 56 of file ExtractFromTime.cpp.
References kSecsPerMin, and unsigned_mod().
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_week | ( | const int64_t | timeval | ) |
Definition at line 180 of file ExtractFromTime.cpp.
References floor_div(), kDaysPer400Years, kEpochAdjustedDays, kSecsPerDay, and unsigned_mod().
ALWAYS_INLINE DEVICE int64_t extract_week_monday | ( | const int64_t | timeval | ) |
Definition at line 196 of file ExtractFromTime.cpp.
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_week_saturday | ( | const int64_t | timeval | ) |
Definition at line 204 of file ExtractFromTime.cpp.
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_week_sunday | ( | const int64_t | timeval | ) |
Definition at line 200 of file ExtractFromTime.cpp.
Referenced by ExtractFromTime().
ALWAYS_INLINE DEVICE int64_t extract_year | ( | const int64_t | timeval | ) |
Definition at line 233 of file ExtractFromTime.cpp.
References extract_year_fast(), floor_div(), kDaysPer400Years, kEpochAdjustedDays, kEpochOffsetYear1900, kSecsPerDay, and MARJAN.
Referenced by ExtractFromTime().
DEVICE int32_t extract_year_fast | ( | const int64_t | lcltime | ) |
Definition at line 139 of file ExtractFromTime.cpp.
References kEpochOffsetYear1900, kSecondsPer4YearCycle, kSecondsPerNonLeapYear, kSecsJanToMar1900, and kUSecsPerDay.
Referenced by extract_year().
DEVICE int64_t ExtractFromTime | ( | ExtractField | field, |
const int64_t | timeval | ||
) |
Definition at line 248 of file ExtractFromTime.cpp.
References extract_dateepoch(), extract_day(), extract_day_of_year(), extract_dow(), extract_epoch(), extract_hour(), extract_isodow(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_month(), extract_nanosecond(), extract_quarter(), extract_quarterday(), extract_second(), extract_week_monday(), extract_week_saturday(), extract_week_sunday(), extract_year(), kDATEEPOCH, kDAY, kDOW, kDOY, kEPOCH, kHOUR, kISODOW, kMICROSECOND, kMILLISECOND, kMINUTE, kMONTH, kNANOSECOND, kQUARTER, kQUARTERDAY, kSECOND, kWEEK, kWEEK_SATURDAY, kWEEK_SUNDAY, and kYEAR.
Referenced by getExpressionRange(), and DateTimeTranslator::getExtractFromTimeConstantValue().