Skip to content
Permalink
Browse files

fix compilation for linux

  • Loading branch information...
sdpython committed Mar 19, 2019
1 parent 2bddc20 commit 80b002b8df0960af4c70a1e391ea321b3644e654
@@ -221,11 +221,11 @@
"metadata": {},
"outputs": [],
"source": [
"from cpyquickhelper.numbers.cbenchmark import measure_scenario_A, measure_scenario_B\n",
"from cpyquickhelper.numbers.cbenchmark import measure_scenario_C, measure_scenario_D\n",
"from cpyquickhelper.numbers.cbenchmark import measure_scenario_E, measure_scenario_F\n",
"from cpyquickhelper.numbers.cbenchmark import measure_scenario_G, measure_scenario_H\n",
"from cpyquickhelper.numbers.cbenchmark import measure_scenario_I, measure_scenario_J"
"from cpyquickhelper.numbers.cbenchmark_dot import measure_scenario_A, measure_scenario_B\n",
"from cpyquickhelper.numbers.cbenchmark_dot import measure_scenario_C, measure_scenario_D\n",
"from cpyquickhelper.numbers.cbenchmark_dot import measure_scenario_E, measure_scenario_F\n",
"from cpyquickhelper.numbers.cbenchmark_dot import measure_scenario_G, measure_scenario_H\n",
"from cpyquickhelper.numbers.cbenchmark_dot import measure_scenario_I, measure_scenario_J"
]
},
{
@@ -1409,7 +1409,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import empty_vector_dot_product\n",
"from cpyquickhelper.numbers.cbenchmark_dot import empty_vector_dot_product\n",
"empty_vector_dot_product(vect, vect)"
]
},
@@ -1466,7 +1466,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import vector_dot_product\n",
"from cpyquickhelper.numbers.cbenchmark_dot import vector_dot_product\n",
"vector_dot_product(vect, vect)"
]
},
@@ -1735,7 +1735,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import vector_dot_product16\n",
"from cpyquickhelper.numbers.cbenchmark_dot import vector_dot_product16\n",
"vector_dot_product16(vect, vect)"
]
},
@@ -2002,7 +2002,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import vector_dot_product16_nofcall\n",
"from cpyquickhelper.numbers.cbenchmark_dot import vector_dot_product16_nofcall\n",
"vector_dot_product16_nofcall(vect, vect)"
]
},
@@ -2258,7 +2258,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import vector_dot_product16_sse\n",
"from cpyquickhelper.numbers.cbenchmark_dot import vector_dot_product16_sse\n",
"vector_dot_product16_sse(vect, vect)"
]
},
@@ -2501,7 +2501,7 @@
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import vector_dot_product16_avx512\n",
"from cpyquickhelper.numbers.cbenchmark_dot import vector_dot_product16_avx512\n",
"vector_dot_product16_avx512(vect, vect)"
]
},
}
],
"source": [
"from cpyquickhelper.numbers.cbenchmark import get_simd_available_option\n",
"from cpyquickhelper.numbers.cbenchmark_dot import get_simd_available_option\n",
"get_simd_available_option()"
]
},
@@ -15,7 +15,8 @@
:showcode:

from pandas import DataFrame, Series
from cpyquickhelper.numbers import WeightedDouble, WeightedSeries
from cpyquickhelper.numbers.weighted_number import WeightedDouble
from cpyquickhelper.numbers.weighted_dataframe import WeightedSeries

n1 = WeightedDouble(1, 1)
n2 = WeightedDouble(3, 2)
@@ -42,7 +43,8 @@
:showcode:

from pandas import DataFrame, Series
from cpyquickhelper.numbers import WeightedDouble, WeightedArray
from cpyquickhelper.numbers.weighted_number import WeightedDouble
from cpyquickhelper.numbers.weighted_dataframe WeightedArray

n1 = WeightedDouble(1, 1)
n2 = WeightedDouble(3, 2)
@@ -23,7 +23,7 @@
sys.path.append(path)
import src

from src.cpyquickhelper.numbers.weighted_number import WeightedDouble
from src.cpyquickhelper.numbers.weighted_number import WeightedDouble # pylint: disable=E0611
from src.cpyquickhelper.numbers.weighted_dataframe import WeightedArray


@@ -55,6 +55,7 @@ def test_style_test(self):
"imported as skip_",
"Unused import src",
"No name 'cprint' in module 'src.cpyquickhelper.io.stdchelper'",
"test_weighted_dataframe.py:29: E0611",
])


@@ -26,7 +26,7 @@
sys.path.append(path)
import src

from src.cpyquickhelper.numbers.weighted_number import WeightedDouble # pylint: disable=E0611
from src.cpyquickhelper.numbers.weighted_number import WeightedDouble # noqa
from src.cpyquickhelper.numbers.weighted_dataframe import WeightedSeriesDtype, WeightedArray, WeightedSeries


@@ -597,6 +597,11 @@ std::string get_simd_available_option()


#ifndef SKIP_PYTHON
#ifdef _MSC_VER
#define CBENCHMARK_MODULE_NAME "cpyquickhelper.numbers.cbenchmark"
#else
#define CBENCHMARK_MODULE_NAME "cbenchmark"
#endif

// See https://github.com/pybind/pybind11/issues/616.
// Required to use ExecutionStat defined in cbenchmark.
@@ -615,8 +620,8 @@ template <> struct py::detail::type_caster<ExecutionStat> {
return true;
}

static handle cast(ExecutionStat v, return_value_policy /*policy*/, handle /*parent*/) {
py::object tv_py = py::module::import("cpyquickhelper.numbers.cbenchmark").attr("ExecutionStat")();
static handle cast(ExecutionStat v, return_value_policy /*policy*/, handle /*parent*/) {
py::object tv_py = py::module::import(CBENCHMARK_MODULE_NAME).attr("ExecutionStat")();
tv_py.attr("number") = py::cast(v.number);
tv_py.attr("repeat") = py::cast(v.repeat);
tv_py.attr("average") = py::cast(v.average);

0 comments on commit 80b002b

Please sign in to comment.
You can’t perform that action at this time.