Skip to content

Instantly share code, notes, and snippets.

Avatar

Johan Mabille JohanMabille

View GitHub Profile
View spar_example.hpp
class base
{
public:
virtual void compute() = 0;
};
class coo_matrix_impl : public base
{
public:
View gist:02132c41995dd75852abdab5b2b3667e
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/lib/pkgconfig/libzmq.pc
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/local_lat
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/remote_lat
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/local_thr
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/remote_thr
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/inproc_lat
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/inproc_thr
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/bin/proxy_thr
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/lib/libzmq.so.5.2.2
/home/yoyo/dev/quantstack/xeus-python-wheel/_skbuild/linux-x86_64-3.8/cmake-install/lib/libzmq.so.5
View xtensor_3_N_13.hpp
template <class T, layout_type L, class A>
class xarray
{
public:
using self_type = xarray<T, L, A>;
static self_type from_shape(const shape_type& s)
{
return self_type(s);
View xtensor_3_N_12.hpp
template <class T, layout_type L, class A>
xarray<T, L, A>::xarray(nested_initializer_list_t<value_type, 2> s)
: xarray()
{
resize(shape<shape_type>(t));
L == layout_type::row_major
? nested_copy(m_storage_begin(), s)
: nested_copy(
this->template begin<layout_type::column_major>(),
s
View xtensor_3_N_11.hpp
template <class T, class S>
void nested_copy(T& iter, const S& s)
{
*iter++ = s;
}
template <class T, class S>
void nested_copy(T& iter, std::initializer_list<S> s)
{
for(auto it = s.begin(); it != s.end(); ++it)
View xtensor_3_N_10.hpp
template <class U>
struct initializer_dimension
{
static constexpr std::size_t value =
initializer_depth_impl<U>::value;
};
View xtensor_3_N_9.hpp
template <class U>
struct initializer_depth_impl
{
static constexpr std::size_t value = 0;
};
template <class T>
struct initializer_depth_impl<std::initializer_list<T>>
{
static constexpr std::size_t value = 1 +
View xtensor_3_N_8.hpp
template <std::size_t I>
struct initializer_shape_impl
{
template <class T>
static constexpr std::size_t value(T t)
{
return t.size() == 0 ? 0
initializer_shape_impl<I - 1>::value(*t.begin());
}
};
View xtensor_3_N_7.hpp
template <class R, class U, size_t... I>
constexpr initializer_shape(U t, std::index_sequence<I...>)
{
using size_type = typename R::value_type;
return R{size_type(initializer_shape_impl<I>::value(t))...};
}
template <class R, class T>
constexpr R shape(T t)
{
View xtensor_3_N_6.hpp
template <class T, layout_type L = XTENSOR_DEFAULT_LAYOUT,
class A = std::allocator<T>>
class xarray
{
public:
xarray(const value_type& t);
xarray(nested_initializer_list_t<value_type, 1> t);
xarray(nested_initializer_list_t<value_type, 2> t);
xarray(nested_initializer_list_t<value_type, 3> t);
You can’t perform that action at this time.