diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/addressof.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/addressof.h new file mode 100644 index 0000000000000000000000000000000000000000..d21df0c76a5ecf90a19a0dc655854ea8228f7ce5 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/addressof.h @@ -0,0 +1,31 @@ +// Copyright (c) 2018 NVIDIA Corporation +// Author: Bryce Adelstein Lelbach +// +// Distributed under the Boost Software License v1.0 (boost.org/LICENSE_1_0.txt) + +#pragma once + +#include + +#if THRUST_CPP_DIALECT >= 2011 +# include +#endif + +THRUST_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// + +/*! Obtains the actual address of the object or function arg, even in presence of overloaded operator&. + */ +template +__host__ __device__ +T* addressof(T& arg) +{ + return reinterpret_cast( + &const_cast(reinterpret_cast(arg)) + ); +} + +/////////////////////////////////////////////////////////////////////////////// + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/advance.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/advance.h new file mode 100644 index 0000000000000000000000000000000000000000..a5162e2030027393c3033cfb0ac040124cc834de --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/advance.h @@ -0,0 +1,140 @@ +/* + * 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 advance.h + * \brief Advance an iterator by a given distance. + */ + +#pragma once + +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup iterators + * \{ + */ + +/*! \p advance(i, n) increments the iterator \p i by the distance \p n. + * If n > 0 it is equivalent to executing ++i \p n + * times, and if n < 0 it is equivalent to executing --i + * \p n times. If n == 0, the call has no effect. + * + * \param i The iterator to be advanced. + * \param n The distance by which to advance the iterator. + * + * \tparam InputIterator is a model of Input Iterator. + * \tparam Distance is an integral type that is convertible to \p InputIterator's distance type. + * + * \pre \p n shall be negative only for bidirectional and random access iterators. + * + * The following code snippet demonstrates how to use \p advance to increment + * an iterator a given number of times. + * + * \code + * #include + * #include + * ... + * thrust::device_vector vec(13); + * thrust::device_vector::iterator iter = vec.begin(); + * + * thrust::advance(iter, 7); + * + * // iter - vec.begin() == 7 + * \endcode + * + * \see https://en.cppreference.com/w/cpp/iterator/advance + */ +template +__host__ __device__ +void advance(InputIterator& i, Distance n); + +/*! \p next(i, n) returns the \p n th successor of the iterator \p i. + * + * \param i An iterator. + * \param n The number of elements to advance. + * + * \tparam InputIterator must meet the InputIterator. + * + * \pre \p n shall be negative only for bidirectional and random access iterators. + * + * The following code snippet demonstrates how to use \p next. + * + * \code + * #include + * #include + * ... + * thrust::device_vector vec(13); + * thrust::device_vector::iterator i0 = vec.begin(); + * + * auto i1 = thrust::next(i0); + * + * // i0 - vec.begin() == 0 + * // i1 - vec.begin() == 1 + * \endcode + * + * \see https://en.cppreference.com/w/cpp/iterator/next + */ +#if 0 // Doxygen only +template +__host__ __device__ +InputIterator next( + InputIterator i +, typename iterator_traits::difference_type n = 1 +); +#endif + +/*! \p prev(i, n) returns the \p n th predecessor of the iterator \p i. + * + * \param i An iterator. + * \param n The number of elements to descend. + * + * \tparam BidirectionalIterator must meet the BidirectionalIterator. + * + * The following code snippet demonstrates how to use \p prev. + * + * \code + * #include + * #include + * ... + * thrust::device_vector vec(13); + * thrust::device_vector::iterator i0 = vec.end(); + * + * auto i1 = thrust::prev(i0); + * + * // vec.end() - i0 == 0 + * // vec.end() - i1 == 1 + * \endcode + * + * \see https://en.cppreference.com/w/cpp/iterator/prev + */ +#if 0 // Doxygen only +template +__host__ __device__ +BidirectionalIterator prev( + BidirectionalIterator i +, typename iterator_traits::difference_type n = 1 +); +#endif + +/*! \} // end iterators + */ + +THRUST_NAMESPACE_END + +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/copy.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/copy.h new file mode 100644 index 0000000000000000000000000000000000000000..99d488174dd6f0b836ba822f1d1c46525453fb91 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/copy.h @@ -0,0 +1,512 @@ +/* + * 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/copy.h + * \brief Copies elements from one range to another + */ + +#pragma once + +#include +#include + +THRUST_NAMESPACE_BEGIN + +/*! \addtogroup algorithms + */ + +/*! \addtogroup copying + * \ingroup algorithms + * \{ + */ + + +/*! \p copy copies elements from the range [\p first, \p last) to the range + * [\p result, \p result + (\p last - \p first)). That is, it performs + * the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1), + * and so on. Generally, for every integer \c n from \c 0 to \p last - \p first, \p copy + * performs the assignment *(\p result + \c n) = *(\p first + \c n). Unlike + * \c std::copy, \p copy offers no guarantee on order of operation. As a result, + * calling \p copy with overlapping source and destination ranges has undefined + * behavior. + * + * The return value is \p result + (\p last - \p first). + * + * The algorithm's execution is parallelized as determined by \p exec. + * + * \param exec The execution policy to use for parallelization. + * \param first The beginning of the sequence to copy. + * \param last The end of the sequence to copy. + * \param result The destination sequence. + * \return The end of the destination sequence. + * \see https://en.cppreference.com/w/cpp/algorithm/copy + * + * \tparam DerivedPolicy The name of the derived execution policy. + * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. + * \tparam OutputIterator must be a model of Output Iterator. + * + * \pre \p result may be equal to \p first, but \p result shall not be in the range [first, last) otherwise. + * + * The following code snippet demonstrates how to use \p copy + * to copy from one range to another using the \p thrust::device parallelization policy: + * + * \code + * #include + * #include + * #include + * ... + * + * thrust::device_vector vec0(100); + * thrust::device_vector vec1(100); + * ... + * + * thrust::copy(thrust::device, vec0.begin(), vec0.end(), vec1.begin()); + * + * // vec1 is now a copy of vec0 + * \endcode + */ +template +__host__ __device__ + OutputIterator copy(const thrust::detail::execution_policy_base &exec, + InputIterator first, + InputIterator last, + OutputIterator result); + + +/*! \p copy_n copies elements from the range [first, first + n) to the range + * [result, result + n). That is, it performs the assignments *result = *first, *(result + 1) = *(first + 1), + * and so on. Generally, for every integer \c i from \c 0 to \c n, \p copy + * performs the assignment *(\p result + \c i) = *(\p first + \c i). Unlike + * \c std::copy_n, \p copy_n offers no guarantee on order of operation. As a result, + * calling \p copy_n with overlapping source and destination ranges has undefined + * behavior. + * + * The return value is \p result + \p n. + * + * The algorithm's execution is parallelized as determined by \p exec. + * + * \param exec The execution policy to use for parallelization. + * \param first The beginning of the range to copy. + * \param n The number of elements to copy. + * \param result The beginning destination range. + * \return The end of the destination range. + * + * \tparam DerivedPolicy The name of the derived execution policy. + * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. + * \tparam Size is an integral type. + * \tparam OutputIterator must be a model of Output Iterator. + * + * \pre \p result may be equal to \p first, but \p result shall not be in the range [first, first + n) otherwise. + * + * The following code snippet demonstrates how to use \p copy + * to copy from one range to another using the \p thrust::device parallelization policy: + * + * \code + * #include + * #include + * #include + * ... + * size_t n = 100; + * thrust::device_vector vec0(n); + * thrust::device_vector vec1(n); + * ... + * thrust::copy_n(thrust::device, vec0.begin(), n, vec1.begin()); + * + * // vec1 is now a copy of vec0 + * \endcode + * + * \see https://en.cppreference.com/w/cpp/algorithm/copy_n + * \see thrust::copy + */ +template +__host__ __device__ + OutputIterator copy_n(const thrust::detail::execution_policy_base &exec, + InputIterator first, + Size n, + OutputIterator result); + + + +/*! \p copy copies elements from the range [\p first, \p last) to the range + * [\p result, \p result + (\p last - \p first)). That is, it performs + * the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1), + * and so on. Generally, for every integer \c n from \c 0 to \p last - \p first, \p copy + * performs the assignment *(\p result + \c n) = *(\p first + \c n). Unlike + * \c std::copy, \p copy offers no guarantee on order of operation. As a result, + * calling \p copy with overlapping source and destination ranges has undefined + * behavior. + * + * The return value is \p result + (\p last - \p first). + * + * \param first The beginning of the sequence to copy. + * \param last The end of the sequence to copy. + * \param result The destination sequence. + * \return The end of the destination sequence. + * \see https://en.cppreference.com/w/cpp/algorithm/copy + * + * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. + * \tparam OutputIterator must be a model of Output Iterator. + * + * \pre \p result may be equal to \p first, but \p result shall not be in the range [first, last) otherwise. + * + * The following code snippet demonstrates how to use \p copy + * to copy from one range to another. + * + * \code + * #include + * #include + * ... + * + * thrust::device_vector vec0(100); + * thrust::device_vector vec1(100); + * ... + * + * thrust::copy(vec0.begin(), vec0.end(), + * vec1.begin()); + * + * // vec1 is now a copy of vec0 + * \endcode + */ +template + OutputIterator copy(InputIterator first, + InputIterator last, + OutputIterator result); + +/*! \p copy_n copies elements from the range [first, first + n) to the range + * [result, result + n). That is, it performs the assignments *result = *first, *(result + 1) = *(first + 1), + * and so on. Generally, for every integer \c i from \c 0 to \c n, \p copy + * performs the assignment *(\p result + \c i) = *(\p first + \c i). Unlike + * \c std::copy_n, \p copy_n offers no guarantee on order of operation. As a result, + * calling \p copy_n with overlapping source and destination ranges has undefined + * behavior. + * + * The return value is \p result + \p n. + * + * \param first The beginning of the range to copy. + * \param n The number of elements to copy. + * \param result The beginning destination range. + * \return The end of the destination range. + * + * \tparam InputIterator must be a model of Input Iterator and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. + * \tparam Size is an integral type. + * \tparam OutputIterator must be a model of Output Iterator. + * + * \pre \p result may be equal to \p first, but \p result shall not be in the range [first, first + n) otherwise. + * + * The following code snippet demonstrates how to use \p copy + * to copy from one range to another. + * + * \code + * #include + * #include + * ... + * size_t n = 100; + * thrust::device_vector vec0(n); + * thrust::device_vector vec1(n); + * ... + * thrust::copy_n(vec0.begin(), n, vec1.begin()); + * + * // vec1 is now a copy of vec0 + * \endcode + * + * \see https://en.cppreference.com/w/cpp/algorithm/copy_n + * \see thrust::copy + */ +template + OutputIterator copy_n(InputIterator first, + Size n, + OutputIterator result); + +/*! \} // end copying + */ + +/*! \addtogroup stream_compaction + * \{ + */ + + +/*! This version of \p copy_if copies elements from the range [first,last) + * to a range beginning at \p result, except that any element which causes \p pred + * to be \c false is not copied. \p copy_if is stable, meaning that the relative + * order of elements that are copied is unchanged. + * + * More precisely, for every integer \c n such that 0 <= n < last-first, + * \p copy_if performs the assignment *result = *(first+n) and \p result + * is advanced one position if pred(*(first+n)). Otherwise, no assignment + * occurs and \p result is not advanced. + * + * The algorithm's execution is parallelized as determined by \p system. + * + * \param exec The execution policy to use for parallelization. + * \param first The beginning of the sequence from which to copy. + * \param last The end of the sequence from which to copy. + * \param result The beginning of the sequence into which to copy. + * \param pred The predicate to test on every value of the range [first, last). + * \return result + n, where \c n is equal to the number of times \p pred + * evaluated to \c true in the range [first, last). + * + * \tparam DerivedPolicy The name of the derived execution policy. + * \tparam InputIterator is a model of Input Iterator, + * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * \tparam OutputIterator is a model of Output Iterator. + * \tparam Predicate is a model of Predicate. + * + * \pre The ranges [first, last) and [result, result + (last - first)) shall not overlap. + * + * The following code snippet demonstrates how to use \p copy_if to perform stream compaction + * to copy even numbers to an output range using the \p thrust::host parallelization policy: + * + * \code + * #include + * #include + * ... + * struct is_even + * { + * __host__ __device__ + * bool operator()(const int x) + * { + * return (x % 2) == 0; + * } + * }; + * ... + * const int N = 6; + * int V[N] = {-2, 0, -1, 0, 1, 2}; + * int result[4]; + * + * thrust::copy_if(thrust::host, V, V + N, result, is_even()); + * + * // V remains {-2, 0, -1, 0, 1, 2} + * // result is now {-2, 0, 0, 2} + * \endcode + * + * \see \c remove_copy_if + */ +template +__host__ __device__ + OutputIterator copy_if(const thrust::detail::execution_policy_base &exec, + InputIterator first, + InputIterator last, + OutputIterator result, + Predicate pred); + + + +/*! This version of \p copy_if copies elements from the range [first,last) + * to a range beginning at \p result, except that any element which causes \p pred + * to \c false is not copied. \p copy_if is stable, meaning that the relative + * order of elements that are copied is unchanged. + * + * More precisely, for every integer \c n such that 0 <= n < last-first, + * \p copy_if performs the assignment *result = *(first+n) and \p result + * is advanced one position if pred(*(first+n)). Otherwise, no assignment + * occurs and \p result is not advanced. + * + * \param first The beginning of the sequence from which to copy. + * \param last The end of the sequence from which to copy. + * \param result The beginning of the sequence into which to copy. + * \param pred The predicate to test on every value of the range [first, last). + * \return result + n, where \c n is equal to the number of times \p pred + * evaluated to \c true in the range [first, last). + * + * \tparam InputIterator is a model of Input Iterator, + * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * \tparam OutputIterator is a model of Output Iterator. + * \tparam Predicate is a model of Predicate. + * + * \pre The ranges [first, last) and [result, result + (last - first)) shall not overlap. + * + * The following code snippet demonstrates how to use \p copy_if to perform stream compaction + * to copy even numbers to an output range. + * + * \code + * #include + * ... + * struct is_even + * { + * __host__ __device__ + * bool operator()(const int x) + * { + * return (x % 2) == 0; + * } + * }; + * ... + * const int N = 6; + * int V[N] = {-2, 0, -1, 0, 1, 2}; + * int result[4]; + * + * thrust::copy_if(V, V + N, result, is_even()); + * + * // V remains {-2, 0, -1, 0, 1, 2} + * // result is now {-2, 0, 0, 2} + * \endcode + * + * \see \c remove_copy_if + */ +template + OutputIterator copy_if(InputIterator first, + InputIterator last, + OutputIterator result, + Predicate pred); + + +/*! This version of \p copy_if copies elements from the range [first,last) + * to a range beginning at \p result, except that any element whose corresponding stencil + * element causes \p pred to be \c false is not copied. \p copy_if is stable, meaning + * that the relative order of elements that are copied is unchanged. + * + * More precisely, for every integer \c n such that 0 <= n < last-first, + * \p copy_if performs the assignment *result = *(first+n) and \p result + * is advanced one position if pred(*(stencil+n)). Otherwise, no assignment + * occurs and \p result is not advanced. + * + * The algorithm's execution is parallelized as determined by \p exec. + * + * \param exec The execution policy to use for parallelization. + * \param first The beginning of the sequence from which to copy. + * \param last The end of the sequence from which to copy. + * \param stencil The beginning of the stencil sequence. + * \param result The beginning of the sequence into which to copy. + * \param pred The predicate to test on every value of the range [stencil, stencil + (last-first)). + * \return result + n, where \c n is equal to the number of times \p pred + * evaluated to \c true in the range [stencil, stencil + (last-first)). + * + * \tparam DerivedPolicy The name of the derived execution policy. + * \tparam InputIterator1 is a model of Input Iterator. + * \tparam InputIterator2 is a model of Input Iterator, + * and \p InputIterator2's \c value_type is convertible to \p Predicate's \c argument_type. + * \tparam OutputIterator is a model of Output Iterator. + * \tparam Predicate is a model of Predicate. + * + * \pre The ranges [first, last) and [result, result + (last - first)) shall not overlap. + * \pre The ranges [stencil, stencil + (last - first)) and [result, result + (last - first)) shall not overlap. + * + * The following code snippet demonstrates how to use \p copy_if to perform stream compaction + * to copy numbers to an output range when corresponding stencil elements are even using the \p thrust::host execution policy: + * + * \code + * #include + * #include + * ... + * struct is_even + * { + * __host__ __device__ + * bool operator()(const int x) + * { + * return (x % 2) == 0; + * } + * }; + * ... + * int N = 6; + * int data[N] = { 0, 1, 2, 3, 4, 5}; + * int stencil[N] = {-2, 0, -1, 0, 1, 2}; + * int result[4]; + * + * thrust::copy_if(thrust::host, data, data + N, stencil, result, is_even()); + * + * // data remains = { 0, 1, 2, 3, 4, 5}; + * // stencil remains = {-2, 0, -1, 0, 1, 2}; + * // result is now { 0, 1, 3, 5} + * \endcode + * + * \see \c remove_copy_if + */ +template +__host__ __device__ + OutputIterator copy_if(const thrust::detail::execution_policy_base &exec, + InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator result, + Predicate pred); + + +/*! This version of \p copy_if copies elements from the range [first,last) + * to a range beginning at \p result, except that any element whose corresponding stencil + * element causes \p pred to be \c false is not copied. \p copy_if is stable, meaning + * that the relative order of elements that are copied is unchanged. + * + * More precisely, for every integer \c n such that 0 <= n < last-first, + * \p copy_if performs the assignment *result = *(first+n) and \p result + * is advanced one position if pred(*(stencil+n)). Otherwise, no assignment + * occurs and \p result is not advanced. + * + * \param first The beginning of the sequence from which to copy. + * \param last The end of the sequence from which to copy. + * \param stencil The beginning of the stencil sequence. + * \param result The beginning of the sequence into which to copy. + * \param pred The predicate to test on every value of the range [stencil, stencil + (last-first)). + * \return result + n, where \c n is equal to the number of times \p pred + * evaluated to \c true in the range [stencil, stencil + (last-first)). + * + * \tparam InputIterator1 is a model of Input Iterator. + * \tparam InputIterator2 is a model of Input Iterator, + * and \p InputIterator2's \c value_type is convertible to \p Predicate's \c argument_type. + * \tparam OutputIterator is a model of Output Iterator. + * \tparam Predicate is a model of Predicate. + * + * \pre The ranges [first, last) and [result, result + (last - first)) shall not overlap. + * \pre The ranges [stencil, stencil + (last - first)) and [result, result + (last - first)) shall not overlap. + * + * The following code snippet demonstrates how to use \p copy_if to perform stream compaction + * to copy numbers to an output range when corresponding stencil elements are even: + * + * \code + * #include + * ... + * struct is_even + * { + * __host__ __device__ + * bool operator()(const int x) + * { + * return (x % 2) == 0; + * } + * }; + * ... + * int N = 6; + * int data[N] = { 0, 1, 2, 3, 4, 5}; + * int stencil[N] = {-2, 0, -1, 0, 1, 2}; + * int result[4]; + * + * thrust::copy_if(data, data + N, stencil, result, is_even()); + * + * // data remains = { 0, 1, 2, 3, 4, 5}; + * // stencil remains = {-2, 0, -1, 0, 1, 2}; + * // result is now { 0, 1, 3, 5} + * \endcode + * + * \see \c remove_copy_if + */ +template + OutputIterator copy_if(InputIterator1 first, + InputIterator1 last, + InputIterator2 stencil, + OutputIterator result, + Predicate pred); + +/*! \} // end stream_compaction + */ + +THRUST_NAMESPACE_END + +#include +#include + diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/adjacent_difference.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/adjacent_difference.inl new file mode 100644 index 0000000000000000000000000000000000000000..844687cff4c9147ea0b93c7bcee45bb74c2538ae --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/adjacent_difference.inl @@ -0,0 +1,86 @@ +/* + * 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 + +__thrust_exec_check_disable__ +template +__host__ __device__ +OutputIterator adjacent_difference(const thrust::detail::execution_policy_base &exec, + InputIterator first, InputIterator last, + OutputIterator result) +{ + using thrust::system::detail::generic::adjacent_difference; + + return adjacent_difference(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result); +} // end adjacent_difference() + + +__thrust_exec_check_disable__ +template +__host__ __device__ +OutputIterator adjacent_difference(const thrust::detail::execution_policy_base &exec, + InputIterator first, InputIterator last, + OutputIterator result, + BinaryFunction binary_op) +{ + using thrust::system::detail::generic::adjacent_difference; + + return adjacent_difference(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, binary_op); +} // end adjacent_difference() + + +template +OutputIterator adjacent_difference(InputIterator first, InputIterator last, + OutputIterator result) +{ + using thrust::system::detail::generic::select_system; + + typedef typename thrust::iterator_system::type System1; + typedef typename thrust::iterator_system::type System2; + + System1 system1; + System2 system2; + + return thrust::adjacent_difference(select_system(system1, system2), first, last, result); +} // end adjacent_difference() + + +template +OutputIterator adjacent_difference(InputIterator first, InputIterator last, + OutputIterator result, + BinaryFunction binary_op) +{ + using thrust::system::detail::generic::select_system; + + typedef typename thrust::iterator_system::type System1; + typedef typename thrust::iterator_system::type System2; + + System1 system1; + System2 system2; + + return thrust::adjacent_difference(select_system(system1, system2), first, last, result, binary_op); +} // end adjacent_difference() + + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/advance.inl b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/advance.inl new file mode 100644 index 0000000000000000000000000000000000000000..7b5f261bdced89967d51894e039e4a58ec05820b --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/advance.inl @@ -0,0 +1,74 @@ +/* + * 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 + +__THRUST_DEFINE_HAS_NESTED_TYPE(has_difference_type, difference_type) + +template +__host__ __device__ +void advance(InputIterator& i, Distance n) +{ + thrust::system::detail::generic::advance(i, n); +} + +template +__host__ __device__ +InputIterator next( + InputIterator i +, typename iterator_traits::difference_type n = 1 +) +{ + thrust::system::detail::generic::advance(i, n); + return i; +} + +template +__host__ __device__ +BidirectionalIterator prev( + BidirectionalIterator i +, typename iterator_traits::difference_type n = 1 +) +{ + thrust::system::detail::generic::advance(i, -n); + return i; +} + +template +__host__ __device__ +typename detail::disable_if< + has_difference_type >::value +, BidirectionalIterator +>::type prev( + BidirectionalIterator i +, typename detail::pointer_traits::difference_type n = 1 +) +{ + thrust::system::detail::generic::advance(i, -n); + return i; +} + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/alignment.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/alignment.h new file mode 100644 index 0000000000000000000000000000000000000000..96fb8436a75286439e62fe5d99ce1a9b4c8b777e --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/alignment.h @@ -0,0 +1,204 @@ +/* + * Copyright 2017 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 alignment.h + * \brief Type-alignment utilities. + */ + +#pragma once + +#include +#include // For `integral_constant`. + +#include // For `std::size_t` and `std::max_align_t`. + +#if THRUST_CPP_DIALECT >= 2011 + #include // For `std::alignment_of`. +#endif + +THRUST_NAMESPACE_BEGIN + +namespace detail +{ + +/// \p THRUST_ALIGNOF is a macro that takes a single type-id as a parameter, +/// and returns the alignment requirement of the type in bytes. +/// +/// It is an approximation of C++11's `alignof` operator. +/// +/// Note: MSVC does not allow the builtin used to implement this to be placed +/// inside of a `__declspec(align(#))` attribute. As a workaround, you can +/// assign the result of \p THRUST_ALIGNOF to a variable and pass the variable +/// as the argument to `__declspec(align(#))`. +#if THRUST_CPP_DIALECT >= 2011 + #define THRUST_ALIGNOF(x) alignof(x) +#else + #define THRUST_ALIGNOF(x) __alignof(x) +#endif + +/// \p alignment_of provides the member constant `value` which is equal to the +/// alignment requirement of the type `T`, as if obtained by a C++11 `alignof` +/// expression. +/// +/// It is an implementation of C++11's \p std::alignment_of. +#if THRUST_CPP_DIALECT >= 2011 + template + using alignment_of = std::alignment_of; +#else + template + struct alignment_of; + + template + struct alignment_of_helper + { + static const std::size_t value = + integral_constant::value; + }; + + template + struct alignment_of_helper + { + static const std::size_t value = alignment_of::value; + }; + + template + struct alignment_of + { + private: + struct impl + { + T x; + char c; + }; + + public: + static const std::size_t value = + alignment_of_helper::value; + }; +#endif + +/// \p aligned_type provides the nested type `type`, which is a trivial +/// type whose alignment requirement is a divisor of `Align`. +/// +/// The behavior is undefined if `Align` is not a power of 2. +template +struct aligned_type; + +#if THRUST_CPP_DIALECT >= 2011 \ + && (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \ + && (THRUST_GCC_VERSION >= 40800) + // C++11 implementation, excluding GCC 4.7, which doesn't have `alignas`. + template + struct aligned_type + { + struct alignas(Align) type {}; + }; +#elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \ + || ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \ + && (THRUST_GCC_VERSION < 40600)) + // C++03 implementation for MSVC and GCC <= 4.5. + // + // We have to implement `aligned_type` with specializations for MSVC + // and GCC 4.2.x and older because they require literals as arguments to + // their alignment attribute. + + #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) + // MSVC implementation. + #define THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(X) \ + template <> \ + struct aligned_type \ + { \ + __declspec(align(X)) struct type {}; \ + }; \ + /**/ + #else + // GCC <= 4.2 implementation. + #define THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(X) \ + template <> \ + struct aligned_type \ + { \ + struct type {} __attribute__((aligned(X))); \ + }; \ + /**/ + #endif + + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(1); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(2); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(4); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(8); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(16); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(32); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(64); + THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(128); + + #undef THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION +#else + // C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC. + template + struct aligned_type + { + struct type {} __attribute__((aligned(Align))); + }; +#endif + +/// \p max_align_t is a trivial type whose alignment requirement is at least as +/// strict (as large) as that of every scalar type. +/// +/// It is an implementation of C++11's \p std::max_align_t. +#if THRUST_CPP_DIALECT >= 2011 \ + && (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \ + && (THRUST_GCC_VERSION >= 40900) + // GCC 4.7 and 4.8 don't have `std::max_align_t`. + using max_align_t = std::max_align_t; +#else + union max_align_t + { + // These cannot be private because C++03 POD types cannot have private + // data members. + char c; + short s; + int i; + long l; + float f; + double d; + long long ll; + long double ld; + void* p; + }; +#endif + +/// \p aligned_reinterpret_cast `reinterpret_cast`s \p u of type \p U to `void*` +/// and then `reinterpret_cast`s the result to \p T. The indirection through +/// `void*` suppresses compiler warnings when the alignment requirement of \p *u +/// is less than the alignment requirement of \p *t. The caller of +/// \p aligned_reinterpret_cast is responsible for ensuring that the alignment +/// requirements are actually satisified. +template +__host__ __device__ +T aligned_reinterpret_cast(U u) +{ + return reinterpret_cast(reinterpret_cast(u)); +} + +__host__ __device__ +inline std::size_t aligned_storage_size(std::size_t n, std::size_t align) +{ + return ((n + align - 1) / align) * align; +} + +} // end namespace detail + +THRUST_NAMESPACE_END diff --git a/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/allocator_aware_execution_policy.h b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/allocator_aware_execution_policy.h new file mode 100644 index 0000000000000000000000000000000000000000..eea93c035eab67ba8c1848c8c693b5b6b2f79c84 --- /dev/null +++ b/videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/allocator_aware_execution_policy.h @@ -0,0 +1,101 @@ +/* + * Copyright 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 + +#if THRUST_CPP_DIALECT >= 2011 + #include +#endif + +THRUST_NAMESPACE_BEGIN + +namespace mr +{ + +template +class allocator; + +} + +namespace detail +{ + +template