コード例 #1
0
ファイル: type_conversion.c プロジェクト: hfeeki/numba
static int
export_type_conversion(PyObject *module)
{
    EXPORT_FUNCTION(__Numba_PyInt_AsChar, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedChar, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedChar, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsShort, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedShort, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsInt, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedInt, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsLongLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedLongLong, module, error)

    EXPORT_FUNCTION(__Numba_PyIndex_AsSsize_t, module, error);
    EXPORT_FUNCTION(__Numba_PyInt_FromSize_t, module, error);

    return 0;
error:
    return -1;
}
コード例 #2
0
ファイル: type_conversion.c プロジェクト: JensTimmerman/numba
static int
export_type_conversion(PyObject *module)
{
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedChar, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedChar, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedShort, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedShort, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedInt, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedInt, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsSignedLongLong, module, error)
    EXPORT_FUNCTION(__Numba_PyInt_AsUnsignedLongLong, module, error)

    EXPORT_FUNCTION(__Numba_PyIndex_AsSsize_t, module, error);
    EXPORT_FUNCTION(__Numba_PyInt_FromSize_t, module, error);

    EXPORT_FUNCTION(__Numba_PyInt_FromLongLong, module, error);
    EXPORT_FUNCTION(__Numba_PyInt_FromUnsignedLongLong, module, error);

    EXPORT_FUNCTION(convert_datetime_str_to_timestamp, module, error);
    EXPORT_FUNCTION(convert_datetime_str_to_units, module, error);
    EXPORT_FUNCTION(convert_numpy_datetime_to_timestamp, module, error);
    EXPORT_FUNCTION(convert_numpy_datetime_to_units, module, error);
    EXPORT_FUNCTION(convert_numpy_timedelta_to_diff, module, error);
    EXPORT_FUNCTION(convert_numpy_timedelta_to_units, module, error);

    EXPORT_FUNCTION(create_numpy_datetime, module, error);
    EXPORT_FUNCTION(create_numpy_timedelta, module, error);

    EXPORT_FUNCTION(extract_datetime_year, module, error);
    EXPORT_FUNCTION(extract_datetime_month, module, error);
    EXPORT_FUNCTION(extract_datetime_day, module, error);
    EXPORT_FUNCTION(extract_datetime_hour, module, error);
    EXPORT_FUNCTION(extract_datetime_min, module, error);
    EXPORT_FUNCTION(extract_datetime_sec, module, error);
    EXPORT_FUNCTION(extract_timedelta_sec, module, error);

    EXPORT_FUNCTION(get_target_unit_for_datetime_datetime, module, error);
    EXPORT_FUNCTION(get_target_unit_for_timedelta_timedelta, module, error);
    EXPORT_FUNCTION(get_target_unit_for_datetime_timedelta, module, error);

    EXPORT_FUNCTION(sub_datetime_datetime, module, error);
    EXPORT_FUNCTION(add_datetime_timedelta, module, error);
    EXPORT_FUNCTION(sub_datetime_timedelta, module, error);

    EXPORT_FUNCTION(convert_timedelta_units_str, module, error);
    EXPORT_FUNCTION(get_units_num, module, error);

    return 0;
error:
    return -1;
}