403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pythran/pythonic/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pythran/pythonic/utils/array_helper.hpp
#ifndef PYTHONIC_UTILS_ARRAY_HELPER_HPP
#define PYTHONIC_UTILS_ARRAY_HELPER_HPP

#include "pythonic/include/utils/array_helper.hpp"
#include "pythonic/types/tuple.hpp"

PYTHONIC_NS_BEGIN

/* recursively return the value at the position given by `indices' in the
 * `self' "array like". It may be a sub array instead of real value.
 * indices[0] is the coordinate for the first dimension && indices[M-1] is
 * for the last one.
 */
template <size_t L>
template <class A, size_t M>
auto nget<L>::operator()(A &&self, types::array<long, M> const &indices)
    -> decltype(nget<L - 1>()(std::forward<A>(self)[0], indices))
{
  return nget<L - 1>()(std::forward<A>(self)[indices[M - L - 1]], indices);
}

template <size_t L>
template <class A, size_t M>
auto nget<L>::fast(A &&self, types::array<long, M> const &indices)
    -> decltype(nget<L - 1>().fast(std::forward<A>(self).fast(0), indices))
{
  return nget<L - 1>().fast(std::forward<A>(self).fast(indices[M - L - 1]),
                            indices);
}

template <class A, size_t M>
auto nget<0>::operator()(A &&self, types::array<long, M> const &indices)
    -> decltype(std::forward<A>(self)[indices[M - 1]])
{
  return std::forward<A>(self)[indices[M - 1]];
}

template <class A, size_t M>
auto nget<0>::fast(A &&self, types::array<long, M> const &indices)
    -> decltype(std::forward<A>(self).fast(indices[M - 1]))
{
  return std::forward<A>(self).fast(indices[M - 1]);
}
PYTHONIC_NS_END
#endif

Youez - 2016 - github.com/yon3zu
LinuXploit