"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 06 - Using conda to manage C++ libraries with pybind11\n",
"\n",
"\n",
"The [pybind11_demo](https://github.com/phaustin/parallel_python_course/tree/master/code_examples/pybind11_demo) folder shows how to use [pybind11](http://pybind11.readthedocs.io/en/stable/?badge=stable) and [xtensor-python](https://xtensor-python.readthedocs.io/en/latest/) to export numerical C++ functions and classes to python.\n",
"\n",
"This is similar to cffi, but contains many more convenience functions to make it easier to work with numpy arrays and python lists, dicts, etc. in C++ while releasing the GIL.\n",
"\n",
"Here is the [filelist](https://github.com/phaustin/parallel_python_course/blob/master/code_examples/pybind11_demo/Readme_pybind11_demo.rst)\n",
"\n",
"\n",
"\n",
"\n",
"**Demo**\n",
"\n",
"Show how to build a conda archive for the thread_tools pbackage\n",
"\n",
" conda build .\n",
" \n",
"and then upload it to your [Anaconda channel](https://anaconda.org/phaustin/dashboard)\n",
"\n",
"Where it can be installed into a conda environment with:\n",
"\n",
" conda install -c phaustin thread_tools\n",
" \n",
"If successful, running:\n",
"\n",
" python test_wait.py\n",
" \n",
"should produce output like this:\n",
"\n",
" pybind11 wall time 2.0149485040456057 and cpu time 1.968194\n",
" \n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
},
"toc": {
"nav_menu": {},
"number_sections": true,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": true,
"toc_position": {},
"toc_section_display": "block",
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}