diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/constant_iterator.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/constant_iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..c6eec28e70e404fcd22c3689cbaa51f71893ec44 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/constant_iterator.h @@ -0,0 +1,250 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file thrust/iterator/constant_iterator.h + * \brief An iterator which returns a constant value when + * dereferenced + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup iterators + * \{ + */ + +/*! \addtogroup fancyiterator Fancy Iterators + * \ingroup iterators + * \{ + */ + +/*! \p constant_iterator is an iterator which represents a pointer into a range + * of constant values. This iterator is useful for creating a range filled with the same + * value without explicitly storing it in memory. Using \p constant_iterator saves both + * memory capacity and bandwidth. + * + * The following code snippet demonstrates how to create a \p constant_iterator whose + * \c value_type is \c int and whose value is \c 10. + * + * \code + * #include + * + * thrust::constant_iterator iter(10); + * + * *iter; // returns 10 + * iter[0]; // returns 10 + * iter[1]; // returns 10 + * iter[13]; // returns 10 + * + * // and so on... + * \endcode + * + * This next example demonstrates how to use a \p constant_iterator with the + * \p thrust::transform function to increment all elements of a sequence by the + * same value. We will create a temporary \p constant_iterator with the function + * \p make_constant_iterator function in order to avoid explicitly specifying + * its type: + * + * \code + * #include + * #include + * #include + * #include + * + * int main() + * { + * thrust::device_vector data(4); + * data[0] = 3; + * data[1] = 7; + * data[2] = 2; + * data[3] = 5; + * + * // add 10 to all values in data + * thrust::transform(data.begin(), data.end(), + * thrust::make_constant_iterator(10), + * data.begin(), + * thrust::plus()); + * + * // data is now [13, 17, 12, 15] + * + * return 0; + * } + * \endcode + * + * \see make_constant_iterator + */ +template + class constant_iterator + : public detail::constant_iterator_base::type +{ + /*! \cond + */ + friend class thrust::iterator_core_access; + typedef typename detail::constant_iterator_base::type super_t; + typedef typename detail::constant_iterator_base::incrementable incrementable; + typedef typename detail::constant_iterator_base::base_iterator base_iterator; + + public: + typedef typename super_t::reference reference; + typedef typename super_t::value_type value_type; + + /*! \endcond + */ + + /*! Null constructor initializes this \p constant_iterator's constant using its + * null constructor. + */ + __host__ __device__ + constant_iterator() + : super_t(), m_value() {} + + /*! Copy constructor copies the value of another \p constant_iterator into this + * \p constant_iterator. + * + * \p rhs The constant_iterator to copy. + */ + __host__ __device__ + constant_iterator(constant_iterator const &rhs) + : super_t(rhs.base()), m_value(rhs.m_value) {} + + /*! Copy constructor copies the value of another \p constant_iterator with related + * System type. + * + * \param rhs The \p constant_iterator to copy. + */ + template + __host__ __device__ + constant_iterator(constant_iterator const &rhs, + typename thrust::detail::enable_if_convertible< + typename thrust::iterator_system >::type, + typename thrust::iterator_system::type + >::type * = 0) + : super_t(rhs.base()), m_value(rhs.value()) {} + + /*! This constructor receives a value to use as the constant value of this + * \p constant_iterator and an index specifying the location of this + * \p constant_iterator in a sequence. + * + * \p v The value of this \p constant_iterator's constant value. + * \p i The index of this \p constant_iterator in a sequence. Defaults to the + * value returned by \c Incrementable's null constructor. For example, + * when Incrementable == int, \c 0. + */ + __host__ __device__ + constant_iterator(value_type const& v, incrementable const &i = incrementable()) + : super_t(base_iterator(i)), m_value(v) {} + + /*! This constructor is templated to allow construction from a value type and + * incrementable type related this this \p constant_iterator's respective types. + * + * \p v The value of this \p constant_iterator's constant value. + * \p i The index of this \p constant_iterator in a sequence. Defaults to the + * value returned by \c Incrementable's null constructor. For example, + * when Incrementable == int, \c 0. + */ + template + __host__ __device__ + constant_iterator(OtherValue const& v, OtherIncrementable const& i = incrementable()) + : super_t(base_iterator(i)), m_value(v) {} + + /*! This method returns the value of this \p constant_iterator's constant value. + * \return A \c const reference to this \p constant_iterator's constant value. + */ + __host__ __device__ + Value const& value() const + { return m_value; } + + /*! \cond + */ + + protected: + __host__ __device__ + Value const& value_reference() const + { return m_value; } + + __host__ __device__ + Value & value_reference() + { return m_value; } + + private: // Core iterator interface + __host__ __device__ + reference dereference() const + { + return m_value; + } + + private: + Value m_value; + + /*! \endcond + */ +}; // end constant_iterator + + +/*! This version of \p make_constant_iterator creates a \p constant_iterator + * from values given for both value and index. The type of \p constant_iterator + * may be inferred by the compiler from the types of its parameters. + * + * \param x The value of the returned \p constant_iterator's constant value. + * \param i The index of the returned \p constant_iterator within a sequence. + * The type of this parameter defaults to \c int. In the default case, + * the value of this parameter is \c 0. + * + * \return A new \p constant_iterator with constant value & index as given + * by \p x & \p i. + * + * \see constant_iterator + */ +template +inline __host__ __device__ +constant_iterator make_constant_iterator(ValueT x, IndexT i = int()) +{ + return constant_iterator(x, i); +} // end make_constant_iterator() + + +/*! This version of \p make_constant_iterator creates a \p constant_iterator + * using only a parameter for the desired constant value. The value of the + * returned \p constant_iterator's index is set to \c 0. + * + * \param x The value of the returned \p constant_iterator's constant value. + * \return A new \p constant_iterator with constant value equal to \p x and + * index equal to \c 0. + * \see constant_iterator + */ +template +inline __host__ __device__ +constant_iterator make_constant_iterator(V x) +{ + return constant_iterator(x, 0); +} // end make_constant_iterator() + +/*! \} // end fancyiterators + */ + +/*! \} // end iterators + */ + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/device_system_tag.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/device_system_tag.h new file mode 100644 index 0000000000000000000000000000000000000000..b86109d216b75e66ed80a265f200bea693a8773d --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/device_system_tag.h @@ -0,0 +1,30 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// #include the device system's execution_policy header +#define __THRUST_DEVICE_SYSTEM_TAG_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/execution_policy.h> +#include __THRUST_DEVICE_SYSTEM_TAG_HEADER +#undef __THRUST_DEVICE_SYSTEM_TAG_HEADER + +THRUST_NAMESPACE_BEGIN + +typedef thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::tag device_system_tag; + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_to_traversal.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_to_traversal.h new file mode 100644 index 0000000000000000000000000000000000000000..d8c736c50a4ac4e441668bdaef9d5997201b6877 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_to_traversal.h @@ -0,0 +1,130 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +namespace detail +{ + +// forward declarations +template struct is_iterator_system; +template struct is_iterator_traversal; + +template + struct host_system_category_to_traversal + : eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + detail::identity_ + > + > + > + > + > +{ +}; // end host_system_category_to_traversal + + + +template + struct device_system_category_to_traversal + : eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + eval_if< + is_convertible::value, + detail::identity_, + detail::identity_ + > + > + > + > + > +{ +}; // end device_system_category_to_traversal + + +template + struct category_to_traversal + // check for host system + : eval_if< + or_< + is_convertible, + is_convertible + >::value, + + host_system_category_to_traversal, + + // check for device system + eval_if< + or_< + is_convertible, + is_convertible + >::value, + + device_system_category_to_traversal, + + // unknown category + detail::identity_ + > + > +{}; + + +template + struct iterator_category_to_traversal + : eval_if< + is_iterator_traversal::value, + detail::identity_, + category_to_traversal + > +{ +}; // end iterator_category_to_traversal + + +} // end detail + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h new file mode 100644 index 0000000000000000000000000000000000000000..cdd8a6d366a0052ab71b72362b85c9af6248a784 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h @@ -0,0 +1,56 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +THRUST_NAMESPACE_BEGIN +namespace detail +{ + + +template + struct iterator_category_with_system_and_traversal + : Category +{ +}; // end iterator_category_with_system_and_traversal + + +// specialize iterator_category_to_system for iterator_category_with_system_and_traversal +template struct iterator_category_to_system; + +template + struct iterator_category_to_system > +{ + typedef System type; +}; // end iterator_category_to_system + + +// specialize iterator_category_to_traversal for iterator_category_with_system_and_traversal +template struct iterator_category_to_traversal; + +template + struct iterator_category_to_traversal > +{ + typedef Traversal type; +}; // end iterator_category_to_traversal + + + +} // end detail +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/permutation_iterator_base.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/permutation_iterator_base.h new file mode 100644 index 0000000000000000000000000000000000000000..d586cabb780266d12d4fb50aaf76932c5369003b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/permutation_iterator_base.h @@ -0,0 +1,54 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +template class permutation_iterator; + + +namespace detail +{ + +template + struct permutation_iterator_base +{ + typedef typename thrust::iterator_system::type System1; + typedef typename thrust::iterator_system::type System2; + + typedef thrust::iterator_adaptor< + permutation_iterator, + IndexIterator, + typename thrust::iterator_value::type, + typename detail::minimum_system::type, + thrust::use_default, + typename thrust::iterator_reference::type + > type; +}; // end permutation_iterator_base + +} // end detail + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/retag.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/retag.h new file mode 100644 index 0000000000000000000000000000000000000000..d277d8b6f2b884e0fdab608e21b15755f2840859 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/retag.h @@ -0,0 +1,147 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace detail +{ + + +// we can retag an iterator if FromTag converts to ToTag +// or vice versa +template + struct is_retaggable + : integral_constant< + bool, + (is_convertible::value || is_convertible::value) + > +{}; + + +template + struct enable_if_retaggable + : enable_if< + is_retaggable::value, + Result + > +{}; // end enable_if_retaggable + + +} // end detail + + +template +__host__ __device__ + thrust::detail::tagged_iterator + reinterpret_tag(Iterator iter) +{ + return thrust::detail::tagged_iterator(iter); +} // end reinterpret_tag() + + +// specialization for raw pointer +template +__host__ __device__ + thrust::pointer + reinterpret_tag(T *ptr) +{ + return thrust::pointer(ptr); +} // end reinterpret_tag() + + +// specialization for thrust::pointer +template +__host__ __device__ + thrust::pointer + reinterpret_tag(thrust::pointer ptr) +{ + return reinterpret_tag(ptr.get()); +} // end reinterpret_tag() + + +// avoid deeply-nested tagged_iterator +template +__host__ __device__ + thrust::detail::tagged_iterator + reinterpret_tag(thrust::detail::tagged_iterator iter) +{ + return reinterpret_tag(iter.base()); +} // end reinterpret_tag() + + +template +__host__ __device__ + typename thrust::detail::enable_if_retaggable< + typename thrust::iterator_system::type, + Tag, + thrust::detail::tagged_iterator + >::type + retag(Iterator iter) +{ + return reinterpret_tag(iter); +} // end retag() + + +// specialization for raw pointer +template +__host__ __device__ + typename thrust::detail::enable_if_retaggable< + typename thrust::iterator_system::type, + Tag, + thrust::pointer + >::type + retag(T *ptr) +{ + return reinterpret_tag(ptr); +} // end retag() + + +// specialization for thrust::pointer +template +__host__ __device__ + typename thrust::detail::enable_if_retaggable< + OtherTag, + Tag, + thrust::pointer + >::type + retag(thrust::pointer ptr) +{ + return reinterpret_tag(ptr); +} // end retag() + + +// avoid deeply-nested tagged_iterator +template +__host__ __device__ + typename thrust::detail::enable_if_retaggable< + OtherTag, + Tag, + thrust::detail::tagged_iterator + >::type + retag(thrust::detail::tagged_iterator iter) +{ + return reinterpret_tag(iter); +} // end retag() + + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/reverse_iterator_base.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/reverse_iterator_base.h new file mode 100644 index 0000000000000000000000000000000000000000..de3bafde979f9ed56fc80941cca6644e83e6b347 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/reverse_iterator_base.h @@ -0,0 +1,43 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include + +THRUST_NAMESPACE_BEGIN + +template class reverse_iterator; + +namespace detail +{ + +template + struct reverse_iterator_base +{ + typedef thrust::iterator_adaptor< + thrust::reverse_iterator, + BidirectionalIterator + > type; +}; // end reverse_iterator_base + +} // end detail + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/transform_iterator.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/transform_iterator.inl new file mode 100644 index 0000000000000000000000000000000000000000..0dc6f9854de9e1c0fc817a8d7f0983767fb2e37d --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/transform_iterator.inl @@ -0,0 +1,69 @@ +/* + * Copyright 2008-2021 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +template + class transform_iterator; + +namespace detail +{ + +// Compute the iterator_adaptor instantiation to be used for transform_iterator +template +struct transform_iterator_base +{ + private: + // By default, dereferencing the iterator yields the same as the function. + typedef typename thrust::detail::ia_dflt_help< + Reference, + thrust::detail::result_of_adaptable_function::type)> + >::type reference; + + // To get the default for Value: remove cvref on the result type. + using value_type = + typename thrust::detail::ia_dflt_help>::type; + + public: + typedef thrust::iterator_adaptor + < + transform_iterator + , Iterator + , value_type + , thrust::use_default // Leave the system alone + //, thrust::use_default // Leave the traversal alone + // use the Iterator's category to let any system iterators remain random access even though + // transform_iterator's reference type may not be a reference + // XXX figure out why only iterators whose reference types are true references are random access + , typename thrust::iterator_traits::iterator_category + , reference + > type; +}; + + +} // end detail +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/zip_iterator_base.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/zip_iterator_base.h new file mode 100644 index 0000000000000000000000000000000000000000..030153b65eae174a8815f8513ff180a11300c481 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/detail/zip_iterator_base.h @@ -0,0 +1,353 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +// forward declare zip_iterator for zip_iterator_base +template class zip_iterator; + +namespace detail +{ + + +// Functors to be used with tuple algorithms +// +template +class advance_iterator +{ +public: + inline __host__ __device__ + advance_iterator(DiffType step) : m_step(step) {} + + __thrust_exec_check_disable__ + template + inline __host__ __device__ + void operator()(Iterator& it) const + { thrust::advance(it, m_step); } + +private: + DiffType m_step; +}; // end advance_iterator + + +struct increment_iterator +{ + __thrust_exec_check_disable__ + template + inline __host__ __device__ + void operator()(Iterator& it) + { ++it; } +}; // end increment_iterator + + +struct decrement_iterator +{ + __thrust_exec_check_disable__ + template + inline __host__ __device__ + void operator()(Iterator& it) + { --it; } +}; // end decrement_iterator + + +struct dereference_iterator +{ + template + struct apply + { + typedef typename + iterator_traits::reference + type; + }; // end apply + + // XXX silence warnings of the form "calling a __host__ function from a __host__ __device__ function is not allowed + __thrust_exec_check_disable__ + template + __host__ __device__ + typename apply::type operator()(Iterator const& it) + { + return *it; + } +}; // end dereference_iterator + + +// The namespace tuple_impl_specific provides two meta- +// algorithms and two algorithms for tuples. +namespace tuple_impl_specific +{ + +// define apply1 for tuple_meta_transform_impl +template + struct apply1 + : UnaryMetaFunctionClass::template apply +{ +}; // end apply1 + + +// define apply2 for tuple_meta_accumulate_impl +template + struct apply2 + : UnaryMetaFunctionClass::template apply +{ +}; // end apply2 + + +// Meta-accumulate algorithm for tuples. Note: The template +// parameter StartType corresponds to the initial value in +// ordinary accumulation. +// +template + struct tuple_meta_accumulate; + +template< + class BinaryMetaFun + , typename StartType +> + struct tuple_meta_accumulate,BinaryMetaFun,StartType> +{ + typedef typename thrust::detail::identity_::type type; +}; + + +template< + class BinaryMetaFun + , typename StartType + , typename T + , typename... Ts +> + struct tuple_meta_accumulate,BinaryMetaFun,StartType> +{ + typedef typename apply2< + BinaryMetaFun + , T + , typename tuple_meta_accumulate< + thrust::tuple + , BinaryMetaFun + , StartType + >::type + >::type type; +}; + + +template +inline __host__ __device__ +Fun tuple_for_each_helper(Fun f) +{ + return f; +} + +template +inline __host__ __device__ +Fun tuple_for_each_helper(Fun f, T& t, Ts&... ts) +{ + f(t); + return tuple_for_each_helper(f, ts...); +} + +// for_each algorithm for tuples. + +template +inline __host__ __device__ +Fun tuple_for_each(thrust::tuple& t, Fun f, thrust::index_sequence) +{ + return tuple_for_each_helper(f, thrust::get(t)...); +} // end tuple_for_each() + +// for_each algorithm for tuples. +template +inline __host__ __device__ +Fun tuple_for_each(thrust::tuple& t, Fun f) +{ + return tuple_for_each(t, f, thrust::make_index_sequence>::value>{}); +} + + +} // end tuple_impl_specific + + +// Metafunction to obtain the type of the tuple whose element types +// are the value_types of an iterator tupel. +// +template + struct tuple_of_value_types + : tuple_meta_transform< + IteratorTuple, + iterator_value + > +{ +}; // end tuple_of_value_types + + +struct minimum_category_lambda +{ + template + struct apply : minimum_category + {}; +}; + + + +// Metafunction to obtain the minimal traversal tag in a tuple +// of iterators. +// +template +struct minimum_traversal_category_in_iterator_tuple +{ + typedef typename tuple_meta_transform< + IteratorTuple + , thrust::iterator_traversal + >::type tuple_of_traversal_tags; + + typedef typename tuple_impl_specific::tuple_meta_accumulate< + tuple_of_traversal_tags + , minimum_category_lambda + , thrust::random_access_traversal_tag + >::type type; +}; + + +struct minimum_system_lambda +{ + template + struct apply : minimum_system + {}; +}; + + + +// Metafunction to obtain the minimal system tag in a tuple +// of iterators. +template +struct minimum_system_in_iterator_tuple +{ + typedef typename thrust::detail::tuple_meta_transform< + IteratorTuple, + thrust::iterator_system + >::type tuple_of_system_tags; + + typedef typename tuple_impl_specific::tuple_meta_accumulate< + tuple_of_system_tags, + minimum_system_lambda, + thrust::any_system_tag + >::type type; +}; + +namespace zip_iterator_base_ns +{ + + +template + struct tuple_of_iterator_references_helper; + + +template + struct tuple_of_iterator_references_helper> +{ + typedef thrust::detail::tuple_of_iterator_references< + typename thrust::tuple_element::type... + > type; +}; + + +template + struct tuple_of_iterator_references +{ + // get a thrust::tuple of the iterators' references + typedef typename tuple_meta_transform< + IteratorTuple, + iterator_reference + >::type tuple_of_references; + + // map thrust::tuple to tuple_of_iterator_references + typedef typename tuple_of_iterator_references_helper< + tuple_of_references, + thrust::make_index_sequence::value> + >::type type; +}; + + +} // end zip_iterator_base_ns + +/////////////////////////////////////////////////////////////////// +// +// Class zip_iterator_base +// +// Builds and exposes the iterator facade type from which the zip +// iterator will be derived. +// +template + struct zip_iterator_base +{ + //private: + // reference type is the type of the tuple obtained from the + // iterators' reference types. + typedef typename zip_iterator_base_ns::tuple_of_iterator_references::type reference; + + // Boost's Value type is the same as reference type. + //typedef reference value_type; + typedef typename tuple_of_value_types::type value_type; + + // Difference type is the first iterator's difference type + typedef typename thrust::iterator_traits< + typename thrust::tuple_element<0, IteratorTuple>::type + >::difference_type difference_type; + + // Iterator system is the minimum system tag in the + // iterator tuple + typedef typename + minimum_system_in_iterator_tuple::type system; + + // Traversal category is the minimum traversal category in the + // iterator tuple + typedef typename + minimum_traversal_category_in_iterator_tuple::type traversal_category; + + public: + + // The iterator facade type from which the zip iterator will + // be derived. + typedef thrust::iterator_facade< + zip_iterator, + value_type, + system, + traversal_category, + reference, + difference_type + > type; +}; // end zip_iterator_base + +} // end detail + +THRUST_NAMESPACE_END + + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/iterator_facade.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/iterator_facade.h new file mode 100644 index 0000000000000000000000000000000000000000..f6920c5c85c05b72a8a4a500513a33623fb0eb25 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/iterator_facade.h @@ -0,0 +1,542 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file thrust/iterator/iterator_facade.h + * \brief A class which exposes a public interface for iterators + */ + +/* + * (C) Copyright David Abrahams 2002. + * (C) Copyright Jeremy Siek 2002. + * (C) Copyright Thomas Witt 2002. + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying NOTICE file for the complete license) + * + * For more information, see http://www.boost.org + */ + + +#pragma once + +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup iterators + * \{ + */ + +/*! \addtogroup fancyiterator Fancy Iterators + * \ingroup iterators + * \{ + */ + + +// This forward declaration is required for the friend declaration +// in iterator_core_access +template class iterator_facade; + + +/*! \p iterator_core_access is the class which user iterator types derived from \p thrust::iterator_adaptor + * or \p thrust::iterator_facade must befriend to allow it to access their private interface. + */ +class iterator_core_access +{ + /*! \cond + */ + + // declare our friends + template friend class iterator_facade; + + // iterator comparisons are our friends + template + inline __host__ __device__ + friend bool + operator ==(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + inline __host__ __device__ + friend bool + operator !=(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + inline __host__ __device__ + friend bool + operator <(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + inline __host__ __device__ + friend bool + operator >(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + inline __host__ __device__ + friend bool + operator <=(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + inline __host__ __device__ + friend bool + operator >=(iterator_facade const& lhs, + iterator_facade const& rhs); + + // iterator difference is our friend + template + inline __host__ __device__ + friend + typename thrust::detail::distance_from_result< + iterator_facade, + iterator_facade + >::type + operator-(iterator_facade const& lhs, + iterator_facade const& rhs); + + template + __host__ __device__ + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + __host__ __device__ + static void increment(Facade& f) + { + f.increment(); + } + + template + __host__ __device__ + static void decrement(Facade& f) + { + f.decrement(); + } + + template + __host__ __device__ + static bool equal(Facade1 const& f1, Facade2 const& f2) + { + return f1.equal(f2); + } + + // XXX TODO: Investigate whether we need both of these cases + //template + //__host__ __device__ + //static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + //{ + // return f1.equal(f2); + //} + + //template + //__host__ __device__ + //static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + //{ + // return f2.equal(f1); + //} + + template + __host__ __device__ + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + // Facade2 is convertible to Facade1, + // so return Facade1's difference_type + template + __host__ __device__ + static typename Facade1::difference_type + distance_from(Facade1 const& f1, Facade2 const& f2, thrust::detail::true_type) + { + return -f1.distance_to(f2); + } + + // Facade2 is not convertible to Facade1, + // so return Facade2's difference_type + template + __host__ __device__ + static typename Facade2::difference_type + distance_from(Facade1 const& f1, Facade2 const& f2, thrust::detail::false_type) + { + return f2.distance_to(f1); + } + + template + __host__ __device__ + static typename thrust::detail::distance_from_result::type + distance_from(Facade1 const& f1, Facade2 const& f2) + { + // dispatch the implementation of this method upon whether or not + // Facade2 is convertible to Facade1 + return distance_from(f1, f2, + typename thrust::detail::is_convertible::type()); + } + + // + // Curiously Recurring Template interface. + // + template + __host__ __device__ + static Derived& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + __host__ __device__ + static Derived const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + /*! \endcond + */ +}; // end iterator_core_access + + +/*! \p iterator_facade is a template which allows the programmer to define a novel iterator with a standards-conforming interface + * which Thrust can use to reason about algorithm acceleration opportunities. + * + * Because most of a standard iterator's interface is defined in terms of a small set of core primitives, \p iterator_facade + * defines the non-primitive portion mechanically. In principle a novel iterator could explicitly provide the entire interface in + * an ad hoc fashion but doing so might be tedious and prone to subtle errors. + * + * Often \p iterator_facade is too primitive a tool to use for defining novel iterators. In these cases, \p iterator_adaptor + * or a specific fancy iterator should be used instead. + * + * \p iterator_facade's functionality is derived from and generally equivalent to \p boost::iterator_facade. + * The exception is Thrust's addition of the template parameter \p System, which is necessary to allow Thrust + * to dispatch an algorithm to one of several parallel backend systems. An additional exception is Thrust's omission + * of the \c operator-> member function. + * + * Interested users may refer to boost::iterator_facade's documentation for usage examples. + * + * \note \p iterator_facade's arithmetic operator free functions exist with the usual meanings but are omitted here for brevity. + */ +template + class iterator_facade +{ + private: + /*! \cond + */ + + // + // Curiously Recurring Template interface. + // + __host__ __device__ + Derived& derived() + { + return *static_cast(this); + } + + __host__ __device__ + Derived const& derived() const + { + return *static_cast(this); + } + /*! \endcond + */ + + public: + /*! The type of element pointed to by \p iterator_facade. + */ + typedef typename thrust::detail::remove_const::type value_type; + + /*! The return type of \p iterator_facade::operator*(). + */ + typedef Reference reference; + + /*! The return type of \p iterator_facade's non-existent \c operator->() + * member function. Unlike \c boost::iterator_facade, \p iterator_facade + * disallows access to the \p value_type's members through expressions of the + * form iter->member. \p pointer is defined to \c void to indicate + * that these expressions are not allowed. This limitation may be relaxed in a + * future version of Thrust. + */ + typedef void pointer; + + /*! The type of expressions of the form x - y where x and y + * are of type \p iterator_facade. + */ + typedef Difference difference_type; + + /*! The type of iterator category of \p iterator_facade. + */ + typedef typename thrust::detail::iterator_facade_category< + System, Traversal, Value, Reference + >::type iterator_category; + + /*! \p operator*() dereferences this \p iterator_facade. + * \return A reference to the element pointed to by this \p iterator_facade. + */ + __host__ __device__ + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + // XXX unimplemented for now, consider implementing it later + //pointer operator->() const + //{ + // return; + //} + + // XXX investigate whether or not we need to go to the lengths + // boost does to determine the return type + + /*! \p operator[] performs indexed dereference. + * \return A reference to the element \p n distance away from this \p iterator_facade. + */ + __host__ __device__ + reference operator[](difference_type n) const + { + return *(this->derived() + n); + } + + /*! \p operator++ pre-increments this \p iterator_facade to refer to the element in the next position. + * \return *this + */ + __host__ __device__ + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } + + /*! \p operator++ post-increments this \p iterator_facade and returns a new \p iterator_facade referring to the element in the next position. + * \return A copy of *this before increment. + */ + __host__ __device__ + Derived operator++(int) + { + Derived tmp(this->derived()); + ++*this; + return tmp; + } + + /*! \p operator-- pre-decrements this \p iterator_facade to refer to the element in the previous position. + * \return *this + */ + __host__ __device__ + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + /*! \p operator-- post-decrements this \p iterator_facade and returns a new \p iterator_facade referring to the element in the previous position. + * \return A copy of *this before decrement. + */ + __host__ __device__ + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + + /*! \p operator+= increments this \p iterator_facade to refer to an element a given distance after its current position. + * \param n The quantity to increment. + * \return *this + */ + __host__ __device__ + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + /*! \p operator-= decrements this \p iterator_facade to refer to an element a given distance before its current postition. + * \param n The quantity to decrement. + * \return *this + */ + __host__ __device__ + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + /*! \p operator- subtracts a given quantity from this \p iterator_facade and returns a new \p iterator_facade referring to the element at the given position before this \p iterator_facade. + * \param n The quantity to decrement + * \return An \p iterator_facade pointing \p n elements before this \p iterator_facade. + */ + __host__ __device__ + Derived operator-(difference_type n) const + { + Derived result(this->derived()); + return result -= n; + } +}; // end iterator_facade + +/*! \cond + */ + +// Comparison operators +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator ==(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return iterator_core_access + ::equal(*static_cast(&lhs), + *static_cast(&rhs)); +} + +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator !=(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return !iterator_core_access + ::equal(*static_cast(&lhs), + *static_cast(&rhs)); +} + +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator <(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return 0 > iterator_core_access + ::distance_from(*static_cast(&lhs), + *static_cast(&rhs)); +} + +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator >(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return 0 < iterator_core_access + ::distance_from(*static_cast(&lhs), + *static_cast(&rhs)); +} + +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator <=(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return 0 >= iterator_core_access + ::distance_from(*static_cast(&lhs), + *static_cast(&rhs)); +} + +template +inline __host__ __device__ +// XXX it might be nice to implement this at some point +//typename enable_if_interoperable::type // exposition +bool +operator >=(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return 0 <= iterator_core_access + ::distance_from(*static_cast(&lhs), + *static_cast(&rhs)); +} + +// Iterator difference +template +inline __host__ __device__ + +// divine the type this operator returns +typename thrust::detail::distance_from_result< + iterator_facade, + iterator_facade +>::type + +operator-(iterator_facade const& lhs, + iterator_facade const& rhs) +{ + return iterator_core_access + ::distance_from(*static_cast(&lhs), + *static_cast(&rhs)); +} + +// Iterator addition +template +inline __host__ __device__ +Derived operator+ (iterator_facade const& i, + typename Derived::difference_type n) +{ + Derived tmp(static_cast(i)); + return tmp += n; +} + +template +inline __host__ __device__ +Derived operator+ (typename Derived::difference_type n, + iterator_facade const& i) +{ + Derived tmp(static_cast(i)); + return tmp += n; +} + +/*! \endcond + */ + +/*! \} // end fancyiterators + */ + +/*! \} // end iterators + */ + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_iterator.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..5afb5f37b0fa56999c25e19687c5ba4dab09329a --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_iterator.h @@ -0,0 +1,355 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file thrust/iterator/transform_iterator.h + * \brief An iterator which adapts another iterator by applying a function to the result of its dereference + */ + +/* + * (C) Copyright David Abrahams 2002. + * (C) Copyright Jeremy Siek 2002. + * (C) Copyright Thomas Witt 2002. + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying NOTICE file for the complete license) + * + * For more information, see http://www.boost.org + */ + +#pragma once + +#include + +// #include the details first +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup iterators + * \{ + */ + +/*! \addtogroup fancyiterator Fancy Iterators + * \ingroup iterators + * \{ + */ + +/*! \p transform_iterator is an iterator which represents a pointer into a range + * of values after transformation by a function. This iterator is useful for + * creating a range filled with the result of applying an operation to another range + * without either explicitly storing it in memory, or explicitly executing the transformation. + * Using \p transform_iterator facilitates kernel fusion by deferring the execution + * of a transformation until the value is needed while saving both memory capacity + * and bandwidth. + * + * The following code snippet demonstrates how to create a \p transform_iterator + * which represents the result of \c sqrtf applied to the contents of a \p device_vector. + * + * \code + * #include + * #include + * + * // note: functor inherits from unary_function + * struct square_root : public thrust::unary_function + * { + * __host__ __device__ + * float operator()(float x) const + * { + * return sqrtf(x); + * } + * }; + * + * int main() + * { + * thrust::device_vector v(4); + * v[0] = 1.0f; + * v[1] = 4.0f; + * v[2] = 9.0f; + * v[3] = 16.0f; + * + * typedef thrust::device_vector::iterator FloatIterator; + * + * thrust::transform_iterator iter(v.begin(), square_root()); + * + * *iter; // returns 1.0f + * iter[0]; // returns 1.0f; + * iter[1]; // returns 2.0f; + * iter[2]; // returns 3.0f; + * iter[3]; // returns 4.0f; + * + * // iter[4] is an out-of-bounds error + * } + * \endcode + * + * This next example demonstrates how to use a \p transform_iterator with the + * \p thrust::reduce function to compute the sum of squares of a sequence. + * We will create temporary \p transform_iterators with the + * \p make_transform_iterator function in order to avoid explicitly specifying their type: + * + * \code + * #include + * #include + * #include + * #include + * + * // note: functor inherits from unary_function + * struct square : public thrust::unary_function + * { + * __host__ __device__ + * float operator()(float x) const + * { + * return x * x; + * } + * }; + * + * int main() + * { + * // initialize a device array + * thrust::device_vector v(4); + * v[0] = 1.0f; + * v[1] = 2.0f; + * v[2] = 3.0f; + * v[3] = 4.0f; + * + * float sum_of_squares = + * thrust::reduce(thrust::make_transform_iterator(v.begin(), square()), + * thrust::make_transform_iterator(v.end(), square())); + * + * std::cout << "sum of squares: " << sum_of_squares << std::endl; + * return 0; + * } + * \endcode + * + * Note that in the previous two examples the transform functor (namely \c square_root + * and \c square) inherits from \c thrust::unary_function. Inheriting from + * \c thrust::unary_function ensures that a functor is a valid \c AdaptableUnaryFunction + * and provides all the necessary \c typedef declarations. The \p transform_iterator + * can also be applied to a \c UnaryFunction that does not inherit from + * \c thrust::unary_function using an optional template argument. The following example + * illustrates how to use the third template argument to specify the \c result_type of + * the function. + * + * \code + * #include + * #include + * + * // note: functor *does not* inherit from unary_function + * struct square_root + * { + * __host__ __device__ + * float operator()(float x) const + * { + * return sqrtf(x); + * } + * }; + * + * int main() + * { + * thrust::device_vector v(4); + * v[0] = 1.0f; + * v[1] = 4.0f; + * v[2] = 9.0f; + * v[3] = 16.0f; + * + * typedef thrust::device_vector::iterator FloatIterator; + * + * // note: float result_type is specified explicitly + * thrust::transform_iterator iter(v.begin(), square_root()); + * + * *iter; // returns 1.0f + * iter[0]; // returns 1.0f; + * iter[1]; // returns 2.0f; + * iter[2]; // returns 3.0f; + * iter[3]; // returns 4.0f; + * + * // iter[4] is an out-of-bounds error + * } + * \endcode + * + * \see make_transform_iterator + */ +template + class transform_iterator + : public detail::transform_iterator_base::type +{ + /*! \cond + */ + public: + typedef typename + detail::transform_iterator_base::type + super_t; + + friend class thrust::iterator_core_access; + /*! \endcond + */ + + public: + /*! Null constructor does nothing. + */ + __host__ __device__ + transform_iterator() {} + +#if THRUST_CPP_DIALECT >= 2011 + transform_iterator(transform_iterator const&) = default; +#endif + + /*! This constructor takes as arguments an \c Iterator and an \c AdaptableUnaryFunction + * and copies them to a new \p transform_iterator. + * + * \param x An \c Iterator pointing to the input to this \p transform_iterator's \c AdaptableUnaryFunction. + * \param f An \c AdaptableUnaryFunction used to transform the objects pointed to by \p x. + */ + __host__ __device__ + transform_iterator(Iterator const& x, AdaptableUnaryFunction f) + : super_t(x), m_f(f) { + } + + /*! This explicit constructor copies the value of a given \c Iterator and creates + * this \p transform_iterator's \c AdaptableUnaryFunction using its null constructor. + * + * \param x An \c Iterator to copy. + */ + __host__ __device__ + explicit transform_iterator(Iterator const& x) + : super_t(x) { } + + /*! This copy constructor creates a new \p transform_iterator from another + * \p transform_iterator. + * + * \param other The \p transform_iterator to copy. + */ + template + __host__ __device__ + transform_iterator(const transform_iterator &other, + typename thrust::detail::enable_if_convertible::type* = 0, + typename thrust::detail::enable_if_convertible::type* = 0) + : super_t(other.base()), m_f(other.functor()) {} + + /*! Copy assignment operator copies from another \p transform_iterator. + * \p other The other \p transform_iterator to copy + * \return *this + * + * \note If the type of this \p transform_iterator's functor is not copy assignable + * (for example, if it is a lambda) it is not an error to call this function. + * In this case, however, the functor will not be modified. + * + * In any case, this \p transform_iterator's underlying iterator will be copy assigned. + */ + __host__ __device__ + transform_iterator &operator=(const transform_iterator &other) + { + return do_assign(other, + // XXX gcc 4.2.1 crashes on is_copy_assignable; just assume the functor is assignable as a WAR +#if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) && (THRUST_GCC_VERSION <= 40201) + thrust::detail::true_type() +#else + typename thrust::detail::is_copy_assignable::type() +#endif // THRUST_HOST_COMPILER + ); + } + + /*! This method returns a copy of this \p transform_iterator's \c AdaptableUnaryFunction. + * \return A copy of this \p transform_iterator's \c AdaptableUnaryFunction. + */ + __host__ __device__ + AdaptableUnaryFunction functor() const + { return m_f; } + + /*! \cond + */ + private: + __host__ __device__ + transform_iterator &do_assign(const transform_iterator &other, thrust::detail::true_type) + { + super_t::operator=(other); + + // do assign to m_f + m_f = other.functor(); + + return *this; + } + + __host__ __device__ + transform_iterator &do_assign(const transform_iterator &other, thrust::detail::false_type) + { + super_t::operator=(other); + + // don't assign to m_f + + return *this; + } + + // MSVC 2013 and 2015 incorrectly warning about returning a reference to + // a local/temporary here. + // See goo.gl/LELTNp + THRUST_DISABLE_MSVC_WARNING_BEGIN(4172) + + __thrust_exec_check_disable__ + __host__ __device__ + typename super_t::reference dereference() const + { + // Create a temporary to allow iterators with wrapped references to + // convert to their value type before calling m_f. Note that this + // disallows non-constant operations through m_f. + typename thrust::iterator_value::type const& x = *this->base(); + return m_f(x); + } + + THRUST_DISABLE_MSVC_WARNING_END(4172) + + // tag this as mutable per Dave Abrahams in this thread: + // http://lists.boost.org/Archives/boost/2004/05/65332.php + mutable AdaptableUnaryFunction m_f; + + /*! \endcond + */ +}; // end transform_iterator + + +/*! \p make_transform_iterator creates a \p transform_iterator + * from an \c Iterator and \c AdaptableUnaryFunction. + * + * \param it The \c Iterator pointing to the input range of the + * newly created \p transform_iterator. + * \param fun The \c AdaptableUnaryFunction used to transform the range pointed + * to by \p it in the newly created \p transform_iterator. + * \return A new \p transform_iterator which transforms the range at + * \p it by \p fun. + * \see transform_iterator + */ +template +inline __host__ __device__ +transform_iterator +make_transform_iterator(Iterator it, AdaptableUnaryFunction fun) +{ + return transform_iterator(it, fun); +} // end make_transform_iterator + +/*! \} // end fancyiterators + */ + +/*! \} // end iterators + */ + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_output_iterator.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_output_iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..3ac4b85729e58151b94184974ef0f839663219f4 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/iterator/transform_output_iterator.h @@ -0,0 +1,164 @@ +/* + * Copyright 2008-2018 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file thrust/iterator/transform_output_iterator.h + * \brief An output iterator which adapts another output iterator by applying a + * function to the result of its dereference before writing it. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup iterators + * \{ + */ + +/*! \addtogroup fancyiterator Fancy Iterators + * \ingroup iterators + * \{ + */ + +/*! \p transform_output_iterator is a special kind of output iterator which + * transforms a value written upon dereference. This iterator is useful + * for transforming an output from algorithms without explicitly storing the + * intermediate result in the memory and applying subsequent transformation, + * thereby avoiding wasting memory capacity and bandwidth. + * Using \p transform_iterator facilitates kernel fusion by deferring execution + * of transformation until the value is written while saving both memory + * capacity and bandwidth. + * + * The following code snippet demonstrated how to create a + * \p transform_output_iterator which applies \c sqrtf to the assigning value. + * + * \code + * #include + * #include + * + * // note: functor inherits form unary function + * // note: functor inherits from unary_function + * struct square_root : public thrust::unary_function + * { + * __host__ __device__ + * float operator()(float x) const + * { + * return sqrtf(x); + * } + * }; + * + * int main() + * { + * thrust::device_vector v(4); + * + * typedef thrust::device_vector::iterator FloatIterator; + * thrust::transform_output_iterator iter(v.begin(), square_root()); + * + * iter[0] = 1.0f; // stores sqrtf( 1.0f) + * iter[1] = 4.0f; // stores sqrtf( 4.0f) + * iter[2] = 9.0f; // stores sqrtf( 9.0f) + * iter[3] = 16.0f; // stores sqrtf(16.0f) + * // iter[4] is an out-of-bounds error + * + * v[0]; // returns 1.0f; + * v[1]; // returns 2.0f; + * v[2]; // returns 3.0f; + * v[3]; // returns 4.0f; + * + * } + * \endcode + * + * \see make_transform_output_iterator + */ + +template + class transform_output_iterator + : public detail::transform_output_iterator_base::type +{ + + /*! \cond + */ + + public: + + typedef typename + detail::transform_output_iterator_base::type + super_t; + + friend class thrust::iterator_core_access; + /*! \endcond + */ + + transform_output_iterator() = default; + + /*! This constructor takes as argument an \c OutputIterator and an \c + * UnaryFunction and copies them to a new \p transform_output_iterator + * + * \param out An \c OutputIterator pointing to the output range whereto the result of + * \p transform_output_iterator's \c UnaryFunction will be written. + * \param fun An \c UnaryFunction used to transform the objects assigned to + * this \p transform_output_iterator. + */ + __host__ __device__ + transform_output_iterator(OutputIterator const& out, UnaryFunction fun) : super_t(out), fun(fun) + { + } + + /*! \cond + */ + private: + + __host__ __device__ + typename super_t::reference dereference() const + { + return detail::transform_output_iterator_proxy< + UnaryFunction, OutputIterator + >(this->base_reference(), fun); + } + + UnaryFunction fun; + + /*! \endcond + */ +}; // end transform_output_iterator + +/*! \p make_transform_output_iterator creates a \p transform_output_iterator from + * an \c OutputIterator and \c UnaryFunction. + * + * \param out The \c OutputIterator pointing to the output range of the newly + * created \p transform_output_iterator + * \param fun The \c UnaryFunction transform the object before assigning it to + * \c out by the newly created \p transform_output_iterator + * \see transform_output_iterator + */ +template +transform_output_iterator +__host__ __device__ +make_transform_output_iterator(OutputIterator out, UnaryFunction fun) +{ + return transform_output_iterator(out, fun); +} // end make_transform_output_iterator + +/*! \} // end fancyiterators + */ + +/*! \} // end iterators + */ + +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/advance.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/advance.inl new file mode 100644 index 0000000000000000000000000000000000000000..21555ebb03f4bbf86bba72667e1db388adae6e23 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/advance.inl @@ -0,0 +1,68 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ +namespace detail +{ + +__thrust_exec_check_disable__ +template +__host__ __device__ +void advance(InputIterator& i, Distance n, thrust::incrementable_traversal_tag) +{ + while(n) + { + ++i; + --n; + } // end while +} // end advance() + +__thrust_exec_check_disable__ +template +__host__ __device__ +void advance(InputIterator& i, Distance n, thrust::random_access_traversal_tag) +{ + i += n; +} // end advance() + +} // end detail + +template +__host__ __device__ +void advance(InputIterator& i, Distance n) +{ + // dispatch on iterator traversal + thrust::system::detail::generic::detail::advance(i, n, + typename thrust::iterator_traversal::type()); +} // end advance() + +} // end namespace detail +} // end namespace generic +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/find.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/find.inl new file mode 100644 index 0000000000000000000000000000000000000000..8bd619561e92a4848a1bb3a034eff143236dabfc --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/find.inl @@ -0,0 +1,151 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +// Contributed by Erich Elsen + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ +InputIterator find(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + const T& value) +{ + using thrust::placeholders::_1; + + return thrust::find_if(exec, first, last, _1 == value); +} // end find() + + +template +struct find_if_functor +{ + __host__ __device__ + TupleType operator()(const TupleType& lhs, const TupleType& rhs) const + { + // select the smallest index among true results + if(thrust::get<0>(lhs) && thrust::get<0>(rhs)) + { + return TupleType(true, (thrust::min)(thrust::get<1>(lhs), thrust::get<1>(rhs))); + } + else if(thrust::get<0>(lhs)) + { + return lhs; + } + else + { + return rhs; + } + } +}; + + +template +__host__ __device__ +InputIterator find_if(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + Predicate pred) +{ + typedef typename thrust::iterator_traits::difference_type difference_type; + typedef typename thrust::tuple result_type; + + // empty sequence + if(first == last) return last; + + const difference_type n = thrust::distance(first, last); + + // this implementation breaks up the sequence into separate intervals + // in an attempt to early-out as soon as a value is found + + // TODO incorporate sizeof(InputType) into interval_threshold and round to multiple of 32 + const difference_type interval_threshold = 1 << 20; + const difference_type interval_size = (thrust::min)(interval_threshold, n); + + // force transform_iterator output to bool + typedef thrust::transform_iterator XfrmIterator; + typedef thrust::tuple > IteratorTuple; + typedef thrust::zip_iterator ZipIterator; + + IteratorTuple iter_tuple = thrust::make_tuple(XfrmIterator(first, pred), + thrust::counting_iterator(0)); + + ZipIterator begin = thrust::make_zip_iterator(iter_tuple); + ZipIterator end = begin + n; + + for(ZipIterator interval_begin = begin; interval_begin < end; interval_begin += interval_size) + { + ZipIterator interval_end = interval_begin + interval_size; + if(end < interval_end) + { + interval_end = end; + } // end if + + result_type result = thrust::reduce(exec, + interval_begin, interval_end, + result_type(false,interval_end - begin), + find_if_functor()); + + // see if we found something + if(thrust::get<0>(result)) + { + return first + thrust::get<1>(result); + } + } + + //nothing was found if we reach here... + return first + n; +} + + +template +__host__ __device__ +InputIterator find_if_not(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + Predicate pred) +{ + return thrust::find_if(exec, first, last, thrust::detail::not1(pred)); +} // end find() + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/inner_product.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/inner_product.h new file mode 100644 index 0000000000000000000000000000000000000000..62d10d31f588643d3a71ebcd069c4a72a05f12b5 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/inner_product.h @@ -0,0 +1,58 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ + OutputType inner_product(thrust::execution_policy &exec, + InputIterator1 first1, + InputIterator1 last1, + InputIterator2 first2, + OutputType init); + + +template +__host__ __device__ +OutputType inner_product(thrust::execution_policy &exec, + InputIterator1 first1, + InputIterator1 last1, + InputIterator2 first2, + OutputType init, + BinaryFunction1 binary_op1, + BinaryFunction2 binary_op2); + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/partition.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/partition.h new file mode 100644 index 0000000000000000000000000000000000000000..113d6ecbc3d369aa173d3c675e221f9991c87674 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/partition.h @@ -0,0 +1,169 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file partition.h + * \brief Generic implementations of partition functions. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ + ForwardIterator stable_partition(thrust::execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred); + +template +__host__ __device__ + ForwardIterator stable_partition(thrust::execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred); + + +template +__host__ __device__ + thrust::pair + stable_partition_copy(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + + +template +__host__ __device__ + thrust::pair + stable_partition_copy(thrust::execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + + +template +__host__ __device__ + ForwardIterator partition(thrust::execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred); + + +template +__host__ __device__ + ForwardIterator partition(thrust::execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred); + + +template +__host__ __device__ + thrust::pair + partition_copy(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + + +template +__host__ __device__ + thrust::pair + partition_copy(thrust::execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + + +template +__host__ __device__ + ForwardIterator partition_point(thrust::execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred); + + +template +__host__ __device__ + bool is_partitioned(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + Predicate pred); + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scan.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scan.inl new file mode 100644 index 0000000000000000000000000000000000000000..45a2aadd087b5e430b00f025747c16ae169f85cd --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scan.inl @@ -0,0 +1,127 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ + OutputIterator inclusive_scan(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result) +{ + // assume plus as the associative operator + return thrust::inclusive_scan(exec, first, last, result, thrust::plus<>()); +} // end inclusive_scan() + + +template +__host__ __device__ + OutputIterator exclusive_scan(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result) +{ + // Use the input iterator's value type per https://wg21.link/P0571 + using ValueType = typename thrust::iterator_value::type; + return thrust::exclusive_scan(exec, first, last, result, ValueType{}); +} // end exclusive_scan() + + +template +__host__ __device__ + OutputIterator exclusive_scan(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + T init) +{ + // assume plus as the associative operator + return thrust::exclusive_scan(exec, first, last, result, init, thrust::plus<>()); +} // end exclusive_scan() + + +template +__host__ __device__ + OutputIterator inclusive_scan(thrust::execution_policy &, + InputIterator, + InputIterator, + OutputIterator result, + BinaryFunction) +{ + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation::value) + , "unimplemented for this system" + ); + return result; +} // end inclusive_scan + + +template +__host__ __device__ + OutputIterator exclusive_scan(thrust::execution_policy &, + InputIterator, + InputIterator, + OutputIterator result, + T, + BinaryFunction) +{ + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation::value) + , "unimplemented for this system" + ); + return result; +} // end exclusive_scan() + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scatter.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scatter.h new file mode 100644 index 0000000000000000000000000000000000000000..6bb7949efa46a01baf81a4ab869a42cb8ec863ab --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/scatter.h @@ -0,0 +1,80 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ + void scatter(thrust::execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 map, + RandomAccessIterator output); + + +template +__host__ __device__ + void scatter_if(thrust::execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 map, + InputIterator3 stencil, + RandomAccessIterator output); + + +template +__host__ __device__ + void scatter_if(thrust::execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 map, + InputIterator3 stencil, + RandomAccessIterator output, + Predicate pred); + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/select_system_exists.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/select_system_exists.h new file mode 100644 index 0000000000000000000000000000000000000000..29d05781d9ec347e1c0aa4f325e608250e16a81b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/select_system_exists.h @@ -0,0 +1,167 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file generic/type_traits.h + * \brief Introspection for free functions defined in generic. + */ + +#pragma once + +#include + +THRUST_NAMESPACE_BEGIN + +// forward declaration of any_system_tag for any_conversion below +struct any_system_tag; + +namespace system +{ +namespace detail +{ + +// we must define these traits outside of generic's namespace +namespace generic_type_traits_ns +{ + +typedef char yes; +typedef char (&no)[2]; + +struct any_conversion +{ + template any_conversion(const T &); + + // add this extra constructor to disambiguate conversion from any_system_tag + any_conversion(const any_system_tag &); +}; + +namespace select_system_exists_ns +{ + no select_system(const any_conversion &); + no select_system(const any_conversion &, const any_conversion &); + no select_system(const any_conversion &, const any_conversion &, const any_conversion &); + no select_system(const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &); + no select_system(const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &); + no select_system(const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &, const any_conversion &); + + template yes check(const T &); + + no check(no); + + template + struct select_system1_exists + { + static Tag &tag; + + static const bool value = sizeof(check(select_system(tag))) == sizeof(yes); + }; + + template + struct select_system2_exists + { + static Tag1 &tag1; + static Tag2 &tag2; + + static const bool value = sizeof(check(select_system(tag1,tag2))) == sizeof(yes); + }; + + template + struct select_system3_exists + { + static Tag1 &tag1; + static Tag2 &tag2; + static Tag3 &tag3; + + static const bool value = sizeof(check(select_system(tag1,tag2,tag3))) == sizeof(yes); + }; + + template + struct select_system4_exists + { + static Tag1 &tag1; + static Tag2 &tag2; + static Tag3 &tag3; + static Tag4 &tag4; + + static const bool value = sizeof(check(select_system(tag1,tag2,tag3,tag4))) == sizeof(yes); + }; + + template + struct select_system5_exists + { + static Tag1 &tag1; + static Tag2 &tag2; + static Tag3 &tag3; + static Tag4 &tag4; + static Tag5 &tag5; + + static const bool value = sizeof(check(select_system(tag1,tag2,tag3,tag4,tag5))) == sizeof(yes); + }; + + template + struct select_system6_exists + { + static Tag1 &tag1; + static Tag2 &tag2; + static Tag3 &tag3; + static Tag4 &tag4; + static Tag5 &tag5; + static Tag6 &tag6; + + static const bool value = sizeof(check(select_system(tag1,tag2,tag3,tag4,tag5,tag6))) == sizeof(yes); + }; +} // end select_system_exists_ns + +} // end generic_type_traits_ns + +namespace generic +{ + +template + struct select_system1_exists + : generic_type_traits_ns::select_system_exists_ns::select_system1_exists +{}; + +template + struct select_system2_exists + : generic_type_traits_ns::select_system_exists_ns::select_system2_exists +{}; + +template + struct select_system3_exists + : generic_type_traits_ns::select_system_exists_ns::select_system3_exists +{}; + +template + struct select_system4_exists + : generic_type_traits_ns::select_system_exists_ns::select_system4_exists +{}; + +template + struct select_system5_exists + : generic_type_traits_ns::select_system_exists_ns::select_system5_exists +{}; + +template + struct select_system6_exists + : generic_type_traits_ns::select_system_exists_ns::select_system6_exists +{}; + +} // end generic +} // end detail +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/shuffle.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/shuffle.h new file mode 100644 index 0000000000000000000000000000000000000000..8f8e21afdf90023989db7c4b59963da1eb3e2938 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/shuffle.h @@ -0,0 +1,54 @@ +/* + * Copyright 2008-2020 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file shuffle.h + * \brief Generic implementations of shuffle functions. + */ + +#pragma once + + +#include +#include + +#if THRUST_CPP_DIALECT >= 2011 + +#include + +THRUST_NAMESPACE_BEGIN +namespace system { +namespace detail { +namespace generic { + +template +__host__ __device__ void shuffle( + thrust::execution_policy& exec, RandomIterator first, + RandomIterator last, URBG&& g); + +template +__host__ __device__ void shuffle_copy( + thrust::execution_policy& exec, RandomIterator first, + RandomIterator last, OutputIterator result, URBG&& g); + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + +#include + +#endif diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/transform_reduce.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/transform_reduce.h new file mode 100644 index 0000000000000000000000000000000000000000..af510296e1ceb5dc4acf9660dbf44f8374118c94 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/detail/generic/transform_reduce.h @@ -0,0 +1,52 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace detail +{ +namespace generic +{ + + +template +__host__ __device__ + OutputType transform_reduce(thrust::execution_policy &exec, + InputIterator first, + InputIterator last, + UnaryFunction unary_op, + OutputType init, + BinaryFunction binary_op); + + +} // end namespace generic +} // end namespace detail +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/adjacent_difference.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/adjacent_difference.h new file mode 100644 index 0000000000000000000000000000000000000000..622ee61bafdd8c80a7b6feb5083a536837fb9452 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/adjacent_difference.h @@ -0,0 +1,49 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template + OutputIterator adjacent_difference(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + BinaryFunction binary_op) +{ + // omp prefers generic::adjacent_difference to cpp::adjacent_difference + return thrust::system::detail::generic::adjacent_difference(exec, first, last, result, binary_op); +} // end adjacent_difference() + +} // end detail +} // end omp +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/assign_value.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/assign_value.h new file mode 100644 index 0000000000000000000000000000000000000000..cf244a02193211b9b4e4f07a6bc9b975d50e5388 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/assign_value.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits assign_value +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/binary_search.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/binary_search.h new file mode 100644 index 0000000000000000000000000000000000000000..1ed700bd8c87d1124bc04de9be1080c0bb6aa6cd --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/binary_search.h @@ -0,0 +1,72 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template +ForwardIterator lower_bound(execution_policy &exec, + ForwardIterator begin, + ForwardIterator end, + const T& value, + StrictWeakOrdering comp) +{ + // omp prefers generic::lower_bound to cpp::lower_bound + return thrust::system::detail::generic::lower_bound(exec, begin, end, value, comp); +} + + +template +ForwardIterator upper_bound(execution_policy &exec, + ForwardIterator begin, + ForwardIterator end, + const T& value, + StrictWeakOrdering comp) +{ + // omp prefers generic::upper_bound to cpp::upper_bound + return thrust::system::detail::generic::upper_bound(exec, begin, end, value, comp); +} + + +template +bool binary_search(execution_policy &exec, + ForwardIterator begin, + ForwardIterator end, + const T& value, + StrictWeakOrdering comp) +{ + // omp prefers generic::binary_search to cpp::binary_search + return thrust::system::detail::generic::binary_search(exec, begin, end, value, comp); +} + + +} // end detail +} // end omp +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.h new file mode 100644 index 0000000000000000000000000000000000000000..ae7b1eed777f04c75cdab17a70bc288d79e38035 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.h @@ -0,0 +1,56 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template +OutputIterator copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result); + + +template +OutputIterator copy_n(execution_policy &exec, + InputIterator first, + Size n, + OutputIterator result); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.inl new file mode 100644 index 0000000000000000000000000000000000000000..47f606dda63bb733657d8797d8702acf155c1182 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy.inl @@ -0,0 +1,136 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ +namespace dispatch +{ + + +template + OutputIterator copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + thrust::incrementable_traversal_tag) +{ + return thrust::system::detail::sequential::copy(exec, first, last, result); +} // end copy() + + +template + OutputIterator copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + thrust::random_access_traversal_tag) +{ + return thrust::system::detail::generic::copy(exec, first, last, result); +} // end copy() + + +template + OutputIterator copy_n(execution_policy &exec, + InputIterator first, + Size n, + OutputIterator result, + thrust::incrementable_traversal_tag) +{ + return thrust::system::detail::sequential::copy_n(exec, first, n, result); +} // end copy_n() + + +template + OutputIterator copy_n(execution_policy &exec, + InputIterator first, + Size n, + OutputIterator result, + thrust::random_access_traversal_tag) +{ + return thrust::system::detail::generic::copy_n(exec, first, n, result); +} // end copy_n() + + +} // end dispatch + + +template +OutputIterator copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result) +{ + typedef typename thrust::iterator_traversal::type traversal1; + typedef typename thrust::iterator_traversal::type traversal2; + + typedef typename thrust::detail::minimum_type::type traversal; + + // dispatch on minimum traversal + return thrust::system::omp::detail::dispatch::copy(exec, first, last, result, traversal()); +} // end copy() + + + +template +OutputIterator copy_n(execution_policy &exec, + InputIterator first, + Size n, + OutputIterator result) +{ + typedef typename thrust::iterator_traversal::type traversal1; + typedef typename thrust::iterator_traversal::type traversal2; + + typedef typename thrust::detail::minimum_type::type traversal; + + // dispatch on minimum traversal + return thrust::system::omp::detail::dispatch::copy_n(exec, first, n, result, traversal()); +} // end copy_n() + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy_if.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy_if.inl new file mode 100644 index 0000000000000000000000000000000000000000..8e597d4fcc5d0dd1592ae5482821c2202979625f --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/copy_if.inl @@ -0,0 +1,53 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + OutputIterator copy_if(execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator result, + Predicate pred) +{ + // omp prefers generic::copy_if to cpp::copy_if + return thrust::system::detail::generic::copy_if(exec, first, last, stencil, result, pred); +} // end copy_if() + + +} // end detail +} // end omp +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.h new file mode 100644 index 0000000000000000000000000000000000000000..2fe0a24fd74dd4f8ba8122c59a6106505af3bc9a --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.h @@ -0,0 +1,44 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file default_decomposition.h + * \brief Return a decomposition that is appropriate for the OpenMP backend. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +thrust::system::detail::internal::uniform_decomposition default_decomposition(IndexType n); + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.inl new file mode 100644 index 0000000000000000000000000000000000000000..0698d53fbdcca8cf5682caef9e9cb26752c4d57b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/default_decomposition.inl @@ -0,0 +1,61 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +// don't attempt to #include this file without omp support +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) +#include +#endif // omp support + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +thrust::system::detail::internal::uniform_decomposition default_decomposition(IndexType n) +{ + // we're attempting to launch an omp kernel, assert we're compiling with omp support + // ======================================================================== + // X Note to the user: If you've found this line due to a compiler error, X + // X you need to OpenMP support in your compiler. X + // ======================================================================== + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation< + IndexType, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + >::value) + , "OpenMP compiler support is not enabled" + ); + +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + return thrust::system::detail::internal::uniform_decomposition(n, 1, omp_get_num_procs()); +#else + return thrust::system::detail::internal::uniform_decomposition(n, 1, 1); +#endif +} + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/equal.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/equal.h new file mode 100644 index 0000000000000000000000000000000000000000..13398fc9db5a02ba7cd7d2141f106fa59ba2a941 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/equal.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits equal +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/execution_policy.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/execution_policy.h new file mode 100644 index 0000000000000000000000000000000000000000..f9b45312be839618126a5a0a46bcafdeaf33fbef --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/execution_policy.h @@ -0,0 +1,106 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +// put the canonical tag in the same ns as the backend's entry points +namespace omp +{ +namespace detail +{ + +// this awkward sequence of definitions arise +// from the desire both for tag to derive +// from execution_policy and for execution_policy +// to convert to tag (when execution_policy is not +// an ancestor of tag) + +// forward declaration of tag +struct tag; + +// forward declaration of execution_policy +template struct execution_policy; + +// specialize execution_policy for tag +template<> + struct execution_policy + : thrust::system::cpp::detail::execution_policy +{}; + +// tag's definition comes before the +// generic definition of execution_policy +struct tag : execution_policy {}; + +// allow conversion to tag when it is not a successor +template + struct execution_policy + : thrust::system::cpp::detail::execution_policy +{ + typedef tag tag_type; + operator tag() const { return tag(); } +}; + + +// overloads of select_system + +// XXX select_system(tbb, omp) & select_system(omp, tbb) are ambiguous +// because both convert to cpp without these overloads, which we +// arbitrarily define in the omp backend + +template +inline __host__ __device__ + System1 select_system(execution_policy s, thrust::system::tbb::detail::execution_policy) +{ + return thrust::detail::derived_cast(s); +} // end select_system() + + +template +inline __host__ __device__ + System2 select_system(thrust::system::tbb::detail::execution_policy, execution_policy s) +{ + return thrust::detail::derived_cast(s); +} // end select_system() + + +} // end detail + +// alias execution_policy and tag here +using thrust::system::omp::detail::execution_policy; +using thrust::system::omp::detail::tag; + +} // end omp +} // end system + +// alias items at top-level +namespace omp +{ + +using thrust::system::omp::execution_policy; +using thrust::system::omp::tag; + +} // end omp +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/extrema.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/extrema.h new file mode 100644 index 0000000000000000000000000000000000000000..bde4e5f80cf52b3e433607b427e23cf5de245594 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/extrema.h @@ -0,0 +1,66 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +ForwardIterator max_element(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate comp) +{ + // omp prefers generic::max_element to cpp::max_element + return thrust::system::detail::generic::max_element(exec, first, last, comp); +} // end max_element() + +template +ForwardIterator min_element(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate comp) +{ + // omp prefers generic::min_element to cpp::min_element + return thrust::system::detail::generic::min_element(exec, first, last, comp); +} // end min_element() + +template +thrust::pair minmax_element(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate comp) +{ + // omp prefers generic::minmax_element to cpp::minmax_element + return thrust::system::detail::generic::minmax_element(exec, first, last, comp); +} // end minmax_element() + +} // end detail +} // end omp +} // end system +THRUST_NAMESPACE_END + + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/fill.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/fill.h new file mode 100644 index 0000000000000000000000000000000000000000..6665a264873f6a0a775de0aa670ee7567d899ad9 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/fill.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits fill +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/find.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/find.h new file mode 100644 index 0000000000000000000000000000000000000000..d2abac95e3025958d9f92e825d20b92d4ef07021 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/find.h @@ -0,0 +1,50 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file find.h + * \brief OpenMP implementation of find_if. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +InputIterator find_if(execution_policy &exec, + InputIterator first, + InputIterator last, + Predicate pred) +{ + // omp prefers generic::find_if to cpp::find_if + return thrust::system::detail::generic::find_if(exec, first, last, pred); +} + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.h new file mode 100644 index 0000000000000000000000000000000000000000..a2030f3746423d5f03b997cbe35e969fbf63edf3 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.h @@ -0,0 +1,59 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file for_each.h + * \brief Defines the interface for a function that executes a + * function or functional for each value in a given range. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template + RandomAccessIterator for_each(execution_policy &exec, + RandomAccessIterator first, + RandomAccessIterator last, + UnaryFunction f); + +template + RandomAccessIterator for_each_n(execution_policy &exec, + RandomAccessIterator first, + Size n, + UnaryFunction f); + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.inl new file mode 100644 index 0000000000000000000000000000000000000000..4246d538070ae8d0d5b13d5a98ee18a7576022ba --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/for_each.inl @@ -0,0 +1,92 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +RandomAccessIterator for_each_n(execution_policy &, + RandomAccessIterator first, + Size n, + UnaryFunction f) +{ + // we're attempting to launch an omp kernel, assert we're compiling with omp support + // ======================================================================== + // X Note to the user: If you've found this line due to a compiler error, X + // X you need to enable OpenMP support in your compiler. X + // ======================================================================== + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation< + RandomAccessIterator, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + >::value) + , "OpenMP compiler support is not enabled" + ); + + if (n <= 0) return first; //empty range + + // create a wrapped function for f + thrust::detail::wrapped_function wrapped_f(f); + + // use a signed type for the iteration variable or suffer the consequences of warnings + typedef typename thrust::iterator_difference::type DifferenceType; + DifferenceType signed_n = n; + + THRUST_PRAGMA_OMP(parallel for) + for(DifferenceType i = 0; + i < signed_n; + ++i) + { + RandomAccessIterator temp = first + i; + wrapped_f(*temp); + } + + return first + n; +} // end for_each_n() + +template + RandomAccessIterator for_each(execution_policy &s, + RandomAccessIterator first, + RandomAccessIterator last, + UnaryFunction f) +{ + return omp::detail::for_each_n(s, first, thrust::distance(first,last), f); +} // end for_each() + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/generate.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/generate.h new file mode 100644 index 0000000000000000000000000000000000000000..f907b6acc079577642c446d6f0736073defc44b8 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/generate.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits generate +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/get_value.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/get_value.h new file mode 100644 index 0000000000000000000000000000000000000000..23a11a8574f77f95bc6ca96d0cd8ff6de8c71c7e --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/get_value.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits get_value +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/inner_product.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/inner_product.h new file mode 100644 index 0000000000000000000000000000000000000000..e8cf941a1dc3df1a6a516eee54f92fa610fd35cc --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/inner_product.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits inner_product +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/iter_swap.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/iter_swap.h new file mode 100644 index 0000000000000000000000000000000000000000..a096739947c8854afe003e6bf498d89683854ff1 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/iter_swap.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits iter_swap +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/logical.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/logical.h new file mode 100644 index 0000000000000000000000000000000000000000..4199063183dbc38b79c7707bb8301e5ca8aa6ad5 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/logical.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits logical +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/malloc_and_free.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/malloc_and_free.h new file mode 100644 index 0000000000000000000000000000000000000000..01ab1e6dbe1732da1f8606b7a9121c1b404edb6f --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/malloc_and_free.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits malloc and free +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/memory.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/memory.inl new file mode 100644 index 0000000000000000000000000000000000000000..db9b4f07b80c6dd808cabb6d77109e8f1c4cb426 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/memory.inl @@ -0,0 +1,86 @@ +/* + * Copyright 2008-2018 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +// XXX circular #inclusion problems cause the compiler to believe that cpp::malloc +// is not defined +// WAR the problem by using adl to call cpp::malloc, which requires it to depend +// on a template parameter +template + pointer malloc_workaround(Tag t, std::size_t n) +{ + return pointer(malloc(t, n)); +} // end malloc_workaround() + +// XXX circular #inclusion problems cause the compiler to believe that cpp::free +// is not defined +// WAR the problem by using adl to call cpp::free, which requires it to depend +// on a template parameter +template + void free_workaround(Tag t, pointer ptr) +{ + free(t, ptr.get()); +} // end free_workaround() + +} // end detail + +inline pointer malloc(std::size_t n) +{ + // XXX this is how we'd like to implement this function, + // if not for circular #inclusion problems: + // + // return pointer(thrust::system::cpp::malloc(n)) + // + return detail::malloc_workaround(cpp::tag(), n); +} // end malloc() + +template +pointer malloc(std::size_t n) +{ + pointer raw_ptr = thrust::system::omp::malloc(sizeof(T) * n); + return pointer(reinterpret_cast(raw_ptr.get())); +} // end malloc() + +inline void free(pointer ptr) +{ + // XXX this is how we'd like to implement this function, + // if not for circular #inclusion problems: + // + // thrust::system::cpp::free(ptr) + // + detail::free_workaround(cpp::tag(), ptr); +} // end free() + +} // end omp +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/mismatch.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/mismatch.h new file mode 100644 index 0000000000000000000000000000000000000000..b5c6b2c4bdd1cc242c87d7526a42e21bf4b1561c --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/mismatch.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits mismatch +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/par.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/par.h new file mode 100644 index 0000000000000000000000000000000000000000..b81a5d4894d3d4f3544a3defedbdd8758f2ca355 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/par.h @@ -0,0 +1,61 @@ +/* + * Copyright 2008-2018 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +struct par_t : thrust::system::omp::detail::execution_policy, + thrust::detail::allocator_aware_execution_policy< + thrust::system::omp::detail::execution_policy> +{ + __host__ __device__ + constexpr par_t() : thrust::system::omp::detail::execution_policy() {} +}; + + +} // end detail + + +static const detail::par_t par; + + +} // end omp +} // end system + + +// alias par here +namespace omp +{ + + +using thrust::system::omp::par; + + +} // end omp +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.h new file mode 100644 index 0000000000000000000000000000000000000000..7a6f4a93447b171e284530a8b6cfd5a3b76d793c --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.h @@ -0,0 +1,90 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file reduce.h + * \brief OpenMP implementation of reduce algorithms. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + ForwardIterator stable_partition(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred); + +template + ForwardIterator stable_partition(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred); + +template + thrust::pair + stable_partition_copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + +template + thrust::pair + stable_partition_copy(execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.inl new file mode 100644 index 0000000000000000000000000000000000000000..ba0a09eafb06743ffd335563db504875047956bd --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/partition.inl @@ -0,0 +1,107 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file reduce.h + * \brief OpenMP implementation of reduce algorithms. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + ForwardIterator stable_partition(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred) +{ + // omp prefers generic::stable_partition to cpp::stable_partition + return thrust::system::detail::generic::stable_partition(exec, first, last, pred); +} // end stable_partition() + + +template + ForwardIterator stable_partition(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred) +{ + // omp prefers generic::stable_partition to cpp::stable_partition + return thrust::system::detail::generic::stable_partition(exec, first, last, stencil, pred); +} // end stable_partition() + + +template + thrust::pair + stable_partition_copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred) +{ + // omp prefers generic::stable_partition_copy to cpp::stable_partition_copy + return thrust::system::detail::generic::stable_partition_copy(exec, first, last, out_true, out_false, pred); +} // end stable_partition_copy() + + +template + thrust::pair + stable_partition_copy(execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator1 out_true, + OutputIterator2 out_false, + Predicate pred) +{ + // omp prefers generic::stable_partition_copy to cpp::stable_partition_copy + return thrust::system::detail::generic::stable_partition_copy(exec, first, last, stencil, out_true, out_false, pred); +} // end stable_partition_copy() + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/pragma_omp.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/pragma_omp.h new file mode 100644 index 0000000000000000000000000000000000000000..a8eeae23449a0cd812708cb7641f87f00c1d9827 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/pragma_omp.h @@ -0,0 +1,56 @@ +/****************************************************************************** +* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the NVIDIA CORPORATION nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +******************************************************************************/ + +#pragma once + +#include + +#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC +// MSVC ICEs when using the standard C++11 `_Pragma` operator with OpenMP +// directives. +// WAR this by using the MSVC-extension `__pragma`. See this link for more info: +// https://developercommunity.visualstudio.com/t/Using-C11s-_Pragma-with-OpenMP-dire/1590628 +#define THRUST_PRAGMA_OMP_IMPL(directive) __pragma(directive) +#else // Not MSVC: +#define THRUST_PRAGMA_OMP_IMPL(directive) _Pragma(#directive) +#endif + +// For internal use only -- THRUST_PRAGMA_OMP is used to switch between +// different flavors of openmp pragmas. Pragmas are not emitted when OpenMP is +// not available. +// +// Usage: +// Replace: #pragma omp parallel for +// With : THRUST_PRAGMA_OMP(parallel for) +// +#if defined(_NVHPC_STDPAR_OPENMP) && _NVHPC_STDPAR_OPENMP == 1 +#define THRUST_PRAGMA_OMP(directive) THRUST_PRAGMA_OMP_IMPL(omp_stdpar directive) +#elif defined(_OPENMP) +#define THRUST_PRAGMA_OMP(directive) THRUST_PRAGMA_OMP_IMPL(omp directive) +#else +#define THRUST_PRAGMA_OMP(directive) +#endif diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce.inl new file mode 100644 index 0000000000000000000000000000000000000000..6a5723780b4af8adcb0444953d8f51cdb9e6f369 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce.inl @@ -0,0 +1,73 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + OutputType reduce(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputType init, + BinaryFunction binary_op) +{ + typedef typename thrust::iterator_difference::type difference_type; + + const difference_type n = thrust::distance(first,last); + + // determine first and second level decomposition + thrust::system::detail::internal::uniform_decomposition decomp1 = thrust::system::omp::detail::default_decomposition(n); + thrust::system::detail::internal::uniform_decomposition decomp2(decomp1.size() + 1, 1, 1); + + // allocate storage for the initializer and partial sums + // XXX use select_system for Tag + thrust::detail::temporary_array partial_sums(exec, decomp1.size() + 1); + + // set first element of temp array to init + partial_sums[0] = init; + + // accumulate partial sums (first level reduction) + thrust::system::omp::detail::reduce_intervals(exec, first, partial_sums.begin() + 1, binary_op, decomp1); + + // reduce partial sums (second level reduction) + thrust::system::omp::detail::reduce_intervals(exec, partial_sums.begin(), partial_sums.begin(), binary_op, decomp2); + + return partial_sums[0]; +} // end reduce() + + +} // end detail +} // end omp +} // end system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_by_key.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_by_key.h new file mode 100644 index 0000000000000000000000000000000000000000..005616de5f1adb5c29b165a666b2dfbbd6c4ddb7 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_by_key.h @@ -0,0 +1,60 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*! \file reduce.h + * \brief OpenMP implementation of reduce algorithms. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + thrust::pair + reduce_by_key(execution_policy &exec, + InputIterator1 keys_first, + InputIterator1 keys_last, + InputIterator2 values_first, + OutputIterator1 keys_output, + OutputIterator2 values_output, + BinaryPredicate binary_pred, + BinaryFunction binary_op); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_intervals.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_intervals.inl new file mode 100644 index 0000000000000000000000000000000000000000..2668a7b6059defb809f9752a61c8fd449fe9dbde --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reduce_intervals.inl @@ -0,0 +1,95 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +void reduce_intervals(execution_policy &, + InputIterator input, + OutputIterator output, + BinaryFunction binary_op, + Decomposition decomp) +{ + // we're attempting to launch an omp kernel, assert we're compiling with omp support + // ======================================================================== + // X Note to the user: If you've found this line due to a compiler error, X + // X you need to enable OpenMP support in your compiler. X + // ======================================================================== + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation< + InputIterator, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + >::value) + , "OpenMP compiler support is not enabled" + ); + +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + typedef typename thrust::iterator_value::type OutputType; + + // wrap binary_op + thrust::detail::wrapped_function wrapped_binary_op(binary_op); + + typedef thrust::detail::intptr_t index_type; + + index_type n = static_cast(decomp.size()); + + THRUST_PRAGMA_OMP(parallel for) + for(index_type i = 0; i < n; i++) + { + InputIterator begin = input + decomp[i].begin(); + InputIterator end = input + decomp[i].end(); + + if (begin != end) + { + OutputType sum = thrust::raw_reference_cast(*begin); + + ++begin; + + while (begin != end) + { + sum = wrapped_binary_op(sum, *begin); + ++begin; + } + + OutputIterator tmp = output + i; + *tmp = sum; + } + } +#endif // THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE +} + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.h new file mode 100644 index 0000000000000000000000000000000000000000..9b2d46e75c67a8cef030f7582cedbf0573133b85 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.h @@ -0,0 +1,80 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template + ForwardIterator remove_if(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred); + + +template + ForwardIterator remove_if(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred); + + +template + OutputIterator remove_copy_if(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + Predicate pred); + + +template + OutputIterator remove_copy_if(execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator result, + Predicate pred); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.inl new file mode 100644 index 0000000000000000000000000000000000000000..5330f140725cd47e229afe42d2b07493f6a3d300 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/remove.inl @@ -0,0 +1,93 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template + ForwardIterator remove_if(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + Predicate pred) +{ + // omp prefers generic::remove_if to cpp::remove_if + return thrust::system::detail::generic::remove_if(exec, first, last, pred); +} + + +template + ForwardIterator remove_if(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + InputIterator stencil, + Predicate pred) +{ + // omp prefers generic::remove_if to cpp::remove_if + return thrust::system::detail::generic::remove_if(exec, first, last, stencil, pred); +} + + +template + OutputIterator remove_copy_if(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + Predicate pred) +{ + // omp prefers generic::remove_copy_if to cpp::remove_copy_if + return thrust::system::detail::generic::remove_copy_if(exec, first, last, result, pred); +} + +template + OutputIterator remove_copy_if(execution_policy &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator result, + Predicate pred) +{ + // omp prefers generic::remove_copy_if to cpp::remove_copy_if + return thrust::system::detail::generic::remove_copy_if(exec, first, last, stencil, result, pred); +} + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/replace.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/replace.h new file mode 100644 index 0000000000000000000000000000000000000000..95c5a14ba3df120019c9a5b6ed638db3f2555a5b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/replace.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits this algorithm +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reverse.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reverse.h new file mode 100644 index 0000000000000000000000000000000000000000..1f3e0325e257c301215e62c690837433ae24c30c --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/reverse.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits reverse +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan.h new file mode 100644 index 0000000000000000000000000000000000000000..f47dbbc3087c613f36de65f704505340bb8a85b0 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits scan +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan_by_key.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan_by_key.h new file mode 100644 index 0000000000000000000000000000000000000000..7f6b42d54410703e7ba96123e9ea0655bbc79ef9 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scan_by_key.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits this algorithm +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scatter.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scatter.h new file mode 100644 index 0000000000000000000000000000000000000000..95c5a14ba3df120019c9a5b6ed638db3f2555a5b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/scatter.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits this algorithm +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/set_operations.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/set_operations.h new file mode 100644 index 0000000000000000000000000000000000000000..421fa8a4bd955706497d0c9b30614035ccbbc46f --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/set_operations.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits set_operations +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.h new file mode 100644 index 0000000000000000000000000000000000000000..cf0b8c6d63687436ef479dcfc4e9a75c7928c582 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.h @@ -0,0 +1,54 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + +template +void stable_sort(execution_policy &exec, + RandomAccessIterator first, + RandomAccessIterator last, + StrictWeakOrdering comp); + +template +void stable_sort_by_key(execution_policy &exec, + RandomAccessIterator1 keys_first, + RandomAccessIterator1 keys_last, + RandomAccessIterator2 values_first, + StrictWeakOrdering comp); + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.inl new file mode 100644 index 0000000000000000000000000000000000000000..a0867ca4d3ebcca5e82b1062c2b88346e4fdc3cb --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/sort.inl @@ -0,0 +1,267 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// don't attempt to #include this file without omp support +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) +#include +#endif // omp support + +#include +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ +namespace sort_detail +{ + + +template +void inplace_merge(execution_policy &exec, + RandomAccessIterator first, + RandomAccessIterator middle, + RandomAccessIterator last, + StrictWeakOrdering comp) +{ + typedef typename thrust::iterator_value::type value_type; + + thrust::detail::temporary_array a(exec, first, middle); + thrust::detail::temporary_array b(exec, middle, last); + + thrust::merge(thrust::seq, a.begin(), a.end(), b.begin(), b.end(), first, comp); +} + + +template +void inplace_merge_by_key(execution_policy &exec, + RandomAccessIterator1 first1, + RandomAccessIterator1 middle1, + RandomAccessIterator1 last1, + RandomAccessIterator2 first2, + StrictWeakOrdering comp) +{ + typedef typename thrust::iterator_value::type value_type1; + typedef typename thrust::iterator_value::type value_type2; + + RandomAccessIterator2 middle2 = first2 + (middle1 - first1); + RandomAccessIterator2 last2 = first2 + (last1 - first1); + + thrust::detail::temporary_array lhs1(exec, first1, middle1); + thrust::detail::temporary_array rhs1(exec, middle1, last1); + thrust::detail::temporary_array lhs2(exec, first2, middle2); + thrust::detail::temporary_array rhs2(exec, middle2, last2); + + thrust::merge_by_key(thrust::seq, + lhs1.begin(), lhs1.end(), + rhs1.begin(), rhs1.end(), + lhs2.begin(), rhs2.begin(), + first1, first2, + comp); +} + + +} // end sort_detail + + +template +void stable_sort(execution_policy &exec, + RandomAccessIterator first, + RandomAccessIterator last, + StrictWeakOrdering comp) +{ + // we're attempting to launch an omp kernel, assert we're compiling with omp support + // ======================================================================== + // X Note to the user: If you've found this line due to a compiler error, X + // X you need to enable OpenMP support in your compiler. X + // ======================================================================== + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation< + RandomAccessIterator, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + >::value) + , "OpenMP compiler support is not enabled" + ); + + // Avoid issues on compilers that don't provide `omp_get_num_threads()`. +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + typedef typename thrust::iterator_difference::type IndexType; + + if(first == last) + return; + + THRUST_PRAGMA_OMP(parallel) + { + thrust::system::detail::internal::uniform_decomposition decomp(last - first, 1, omp_get_num_threads()); + + // process id + IndexType p_i = omp_get_thread_num(); + + // every thread sorts its own tile + if(p_i < decomp.size()) + { + thrust::stable_sort(thrust::seq, + first + decomp[p_i].begin(), + first + decomp[p_i].end(), + comp); + } + + THRUST_PRAGMA_OMP(barrier) + + // XXX For some reason, MSVC 2015 yields an error unless we include this meaningless semicolon here + ; + + IndexType nseg = decomp.size(); + IndexType h = 2; + + // keep track of which sub-range we're processing + IndexType a=p_i, b=p_i, c=p_i+1; + + while(nseg>1) + { + if(c >= decomp.size()) + c = decomp.size() - 1; + + if((p_i % h) == 0 && c > b) + { + sort_detail::inplace_merge(exec, + first + decomp[a].begin(), + first + decomp[b].end(), + first + decomp[c].end(), + comp); + + b = c; + c += h; + } + + nseg = (nseg + 1) / 2; + h *= 2; + + THRUST_PRAGMA_OMP(barrier) + } + } +#endif // THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE +} + + +template +void stable_sort_by_key(execution_policy &exec, + RandomAccessIterator1 keys_first, + RandomAccessIterator1 keys_last, + RandomAccessIterator2 values_first, + StrictWeakOrdering comp) +{ + // we're attempting to launch an omp kernel, assert we're compiling with omp support + // ======================================================================== + // X Note to the user: If you've found this line due to a compiler error, X + // X you need to enable OpenMP support in your compiler. X + // ======================================================================== + THRUST_STATIC_ASSERT_MSG( + (thrust::detail::depend_on_instantiation< + RandomAccessIterator1, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + >::value) + , "OpenMP compiler support is not enabled" + ); + + // Avoid issues on compilers that don't provide `omp_get_num_threads()`. +#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE) + typedef typename thrust::iterator_difference::type IndexType; + + if(keys_first == keys_last) + return; + + THRUST_PRAGMA_OMP(parallel) + { + thrust::system::detail::internal::uniform_decomposition decomp(keys_last - keys_first, 1, omp_get_num_threads()); + + // process id + IndexType p_i = omp_get_thread_num(); + + // every thread sorts its own tile + if(p_i < decomp.size()) + { + thrust::stable_sort_by_key(thrust::seq, + keys_first + decomp[p_i].begin(), + keys_first + decomp[p_i].end(), + values_first + decomp[p_i].begin(), + comp); + } + + THRUST_PRAGMA_OMP(barrier) + + // XXX For some reason, MSVC 2015 yields an error unless we include this meaningless semicolon here + ; + + IndexType nseg = decomp.size(); + IndexType h = 2; + + // keep track of which sub-range we're processing + IndexType a=p_i, b=p_i, c=p_i+1; + + while(nseg>1) + { + if(c >= decomp.size()) + c = decomp.size() - 1; + + if((p_i % h) == 0 && c > b) + { + sort_detail::inplace_merge_by_key(exec, + keys_first + decomp[a].begin(), + keys_first + decomp[b].end(), + keys_first + decomp[c].end(), + values_first + decomp[a].begin(), + comp); + + b = c; + c += h; + } + + nseg = (nseg + 1) / 2; + h *= 2; + + THRUST_PRAGMA_OMP(barrier) + } + } +#endif // THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE +} + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/swap_ranges.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/swap_ranges.h new file mode 100644 index 0000000000000000000000000000000000000000..8c3338b1baf58a3628245072f4f4700dcd3bc025 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/swap_ranges.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// omp inherits swap_ranges +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/tabulate.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/tabulate.h new file mode 100644 index 0000000000000000000000000000000000000000..ea135c707064b7195e4a78efc15849ba431e9068 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/tabulate.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits tabulate +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform.h new file mode 100644 index 0000000000000000000000000000000000000000..20d606dfbeec6d376a138db500ec368d94efa748 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// omp inherits transform +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_reduce.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_reduce.h new file mode 100644 index 0000000000000000000000000000000000000000..a8736bd75d06e54d9158baeb2504162d75312885 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_reduce.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits transform_reduce +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_scan.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_scan.h new file mode 100644 index 0000000000000000000000000000000000000000..75b075b6b16f063a1c5cda8893911d3f3c533f2d --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/transform_scan.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits transform_scan +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_copy.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_copy.h new file mode 100644 index 0000000000000000000000000000000000000000..bda06ac13e9ca1d14ee5e047986884f5207d3d2b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_copy.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits uninitialized_copy +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_fill.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_fill.h new file mode 100644 index 0000000000000000000000000000000000000000..764de876233a012e5a9de9113c5fb2dac7a22499 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/uninitialized_fill.h @@ -0,0 +1,23 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +// this system inherits uninitialized_fill +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.h new file mode 100644 index 0000000000000000000000000000000000000000..cf8025665acee615e51d31b854f9626546ccb296 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.h @@ -0,0 +1,68 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + ForwardIterator unique(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate binary_pred); + + +template + OutputIterator unique_copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator output, + BinaryPredicate binary_pred); + + +template + typename thrust::iterator_traits::difference_type + unique_count(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate binary_pred); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.inl new file mode 100644 index 0000000000000000000000000000000000000000..9a93fb1358407090e1885024b408ca86b822094d --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique.inl @@ -0,0 +1,79 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + ForwardIterator unique(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate binary_pred) +{ + // omp prefers generic::unique to cpp::unique + return thrust::system::detail::generic::unique(exec,first,last,binary_pred); +} // end unique() + + +template + OutputIterator unique_copy(execution_policy &exec, + InputIterator first, + InputIterator last, + OutputIterator output, + BinaryPredicate binary_pred) +{ + // omp prefers generic::unique_copy to cpp::unique_copy + return thrust::system::detail::generic::unique_copy(exec,first,last,output,binary_pred); +} // end unique_copy() + + +template + typename thrust::iterator_traits::difference_type + unique_count(execution_policy &exec, + ForwardIterator first, + ForwardIterator last, + BinaryPredicate binary_pred) +{ + // omp prefers generic::unique_count to cpp::unique_count + return thrust::system::detail::generic::unique_count(exec,first,last,binary_pred); +} // end unique_count() + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.h new file mode 100644 index 0000000000000000000000000000000000000000..43859b64e89fbbf297fc63e34a3d8dace58bc58a --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.h @@ -0,0 +1,66 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + thrust::pair + unique_by_key(execution_policy &exec, + ForwardIterator1 keys_first, + ForwardIterator1 keys_last, + ForwardIterator2 values_first, + BinaryPredicate binary_pred); + + +template + thrust::pair + unique_by_key_copy(execution_policy &exec, + InputIterator1 keys_first, + InputIterator1 keys_last, + InputIterator2 values_first, + OutputIterator1 keys_output, + OutputIterator2 values_output, + BinaryPredicate binary_pred); + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.inl new file mode 100644 index 0000000000000000000000000000000000000000..6610c8a0080e5f7642632d4901fe39100f80db8b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/detail/unique_by_key.inl @@ -0,0 +1,73 @@ +/* + * Copyright 2008-2013 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system +{ +namespace omp +{ +namespace detail +{ + + +template + thrust::pair + unique_by_key(execution_policy &exec, + ForwardIterator1 keys_first, + ForwardIterator1 keys_last, + ForwardIterator2 values_first, + BinaryPredicate binary_pred) +{ + // omp prefers generic::unique_by_key to cpp::unique_by_key + return thrust::system::detail::generic::unique_by_key(exec,keys_first,keys_last,values_first,binary_pred); +} // end unique_by_key() + + +template + thrust::pair + unique_by_key_copy(execution_policy &exec, + InputIterator1 keys_first, + InputIterator1 keys_last, + InputIterator2 values_first, + OutputIterator1 keys_output, + OutputIterator2 values_output, + BinaryPredicate binary_pred) +{ + // omp prefers generic::unique_by_key_copy to cpp::unique_by_key_copy + return thrust::system::detail::generic::unique_by_key_copy(exec,keys_first,keys_last,values_first,keys_output,values_output,binary_pred); +} // end unique_by_key_copy() + + +} // end namespace detail +} // end namespace omp +} // end namespace system +THRUST_NAMESPACE_END + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory.h new file mode 100644 index 0000000000000000000000000000000000000000..31f407c4c6f2666ee2da965413b73492fe41420c --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory.h @@ -0,0 +1,101 @@ +/* + * Copyright 2008-2018 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file thrust/system/omp/memory.h + * \brief Managing memory associated with Thrust's OpenMP system. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system { namespace omp +{ + +/*! Allocates an area of memory available to Thrust's omp system. + * \param n Number of bytes to allocate. + * \return A omp::pointer pointing to the beginning of the newly + * allocated memory. A null omp::pointer is returned if + * an error occurs. + * \note The omp::pointer returned by this function must be + * deallocated with \p omp::free. + * \see omp::free + * \see std::malloc + */ +inline pointer malloc(std::size_t n); + +/*! Allocates a typed area of memory available to Thrust's omp system. + * \param n Number of elements to allocate. + * \return A omp::pointer pointing to the beginning of the newly + * allocated memory. A null omp::pointer is returned if + * an error occurs. + * \note The omp::pointer returned by this function must be + * deallocated with \p omp::free. + * \see omp::free + * \see std::malloc + */ +template +inline pointer malloc(std::size_t n); + +/*! Deallocates an area of memory previously allocated by omp::malloc. + * \param ptr A omp::pointer pointing to the beginning of an area + * of memory previously allocated with omp::malloc. + * \see omp::malloc + * \see std::free + */ +inline void free(pointer ptr); + +/*! \p omp::allocator is the default allocator used by the \p omp system's + * containers such as omp::vector if no user-specified allocator is + * provided. \p omp::allocator allocates (deallocates) storage with \p + * omp::malloc (\p omp::free). + */ +template +using allocator = thrust::mr::stateless_resource_allocator< + T, thrust::system::omp::memory_resource +>; + +/*! \p omp::universal_allocator allocates memory that can be used by the \p omp + * system and host systems. + */ +template +using universal_allocator = thrust::mr::stateless_resource_allocator< + T, thrust::system::omp::universal_memory_resource +>; + +}} // namespace system::omp + +/*! \namespace thrust::omp + * \brief \p thrust::omp is a top-level alias for thrust::system::omp. + */ +namespace omp +{ +using thrust::system::omp::malloc; +using thrust::system::omp::free; +using thrust::system::omp::allocator; +using thrust::system::omp::universal_allocator; +} // namespace omp + +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory_resource.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory_resource.h new file mode 100644 index 0000000000000000000000000000000000000000..d8eed0c0f9e6f16f1dc8c0f6ae13cb26b077eb32 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/memory_resource.h @@ -0,0 +1,69 @@ +/* + * Copyright 2018-2020 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file omp/memory_resource.h + * \brief Memory resources for the OpenMP system. + */ + +#pragma once + +#include +#include +#include + +#include + +THRUST_NAMESPACE_BEGIN +namespace system { namespace omp +{ + +//! \cond +namespace detail +{ + typedef thrust::mr::fancy_pointer_resource< + thrust::mr::new_delete_resource, + thrust::omp::pointer + > native_resource; + + typedef thrust::mr::fancy_pointer_resource< + thrust::mr::new_delete_resource, + thrust::omp::universal_pointer + > universal_native_resource; +} // namespace detail +//! \endcond + +/*! \addtogroup memory_resources Memory Resources + * \ingroup memory_management + * \{ + */ + +/*! The memory resource for the OpenMP system. Uses \p mr::new_delete_resource + * and tags it with \p omp::pointer. + */ +typedef detail::native_resource memory_resource; +/*! The unified memory resource for the OpenMP system. Uses + * \p mr::new_delete_resource and tags it with \p omp::universal_pointer. + */ +typedef detail::universal_native_resource universal_memory_resource; +/*! An alias for \p omp::universal_memory_resource. */ +typedef detail::native_resource universal_host_pinned_memory_resource; + +/*! \} + */ + +}} // namespace system::omp + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/pointer.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/pointer.h new file mode 100644 index 0000000000000000000000000000000000000000..2be42e4fcf6c83355cc514e2954fb896c75c87f3 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/system/omp/pointer.h @@ -0,0 +1,117 @@ +/* + * Copyright 2008-2020 NVIDIA Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! \file thrust/system/omp/memory.h + * \brief Managing memory associated with Thrust's OpenMP system. + */ + +#pragma once + +#include +#include +#include +#include +#include + +THRUST_NAMESPACE_BEGIN +namespace system { namespace omp +{ + +/*! \p omp::pointer stores a pointer to an object allocated in memory accessible + * by the \p omp system. This type provides type safety when dispatching + * algorithms on ranges resident in \p omp memory. + * + * \p omp::pointer has pointer semantics: it may be dereferenced and + * manipulated with pointer arithmetic. + * + * \p omp::pointer can be created with the function \p omp::malloc, or by + * explicitly calling its constructor with a raw pointer. + * + * The raw pointer encapsulated by a \p omp::pointer may be obtained by eiter its + * get member function or the \p raw_pointer_cast function. + * + * \note \p omp::pointer is not a "smart" pointer; it is the programmer's + * responsibility to deallocate memory pointed to by \p omp::pointer. + * + * \tparam T specifies the type of the pointee. + * + * \see omp::malloc + * \see omp::free + * \see raw_pointer_cast + */ +template +using pointer = thrust::pointer< + T, + thrust::system::omp::tag, + thrust::tagged_reference +>; + +/*! \p omp::universal_pointer stores a pointer to an object allocated in memory + * accessible by the \p omp system and host systems. + * + * \p omp::universal_pointer has pointer semantics: it may be dereferenced and + * manipulated with pointer arithmetic. + * + * \p omp::universal_pointer can be created with \p omp::universal_allocator + * or by explicitly calling its constructor with a raw pointer. + * + * The raw pointer encapsulated by a \p omp::universal_pointer may be obtained + * by eiter its get member function or the \p raw_pointer_cast + * function. + * + * \note \p omp::universal_pointer is not a "smart" pointer; it is the + * programmer's responsibility to deallocate memory pointed to by + * \p omp::universal_pointer. + * + * \tparam T specifies the type of the pointee. + * + * \see omp::universal_allocator + * \see raw_pointer_cast + */ +template +using universal_pointer = thrust::pointer< + T, + thrust::system::omp::tag, + typename std::add_lvalue_reference::type +>; + +/*! \p reference is a wrapped reference to an object stored in memory available + * to the \p omp system. \p reference is the type of the result of + * dereferencing a \p omp::pointer. + * + * \tparam T Specifies the type of the referenced object. + */ +template +using reference = thrust::tagged_reference; + +}} // namespace system::omp + +/*! \addtogroup system_backends Systems + * \ingroup system + * \{ + */ + +/*! \namespace thrust::omp + * \brief \p thrust::omp is a top-level alias for \p thrust::system::omp. */ +namespace omp +{ +using thrust::system::omp::pointer; +using thrust::system::omp::universal_pointer; +using thrust::system::omp::reference; +} // namespace omp + +THRUST_NAMESPACE_END +