libpsynth 0.2.1
Classes | Namespaces | Functions
/home/raskolnikov/dev/psynth/trunk/src/psynth/sound/algorithm.hpp File Reference

Time-stamp: <2011-04-01 13:13:44 raskolnikov> More...

#include <cassert>
#include <cstddef>
#include <cstring>
#include <algorithm>
#include <iterator>
#include <memory>
#include <typeinfo>
#include <psynth/base/compat.hpp>
#include <psynth/base/concept.hpp>
#include <psynth/sound/concept.hpp>
#include <psynth/sound/channel_base_algorithm.hpp>
#include <psynth/sound/buffer_range.hpp>
#include <psynth/sound/buffer_range_factory.hpp>
#include <psynth/sound/bit_aligned_frame_iterator.hpp>
Include dependency graph for algorithm.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  psynth::sound::error_type
 A tag denoting incompatible arguments. More...
struct  psynth::sound::binary_operation_obj< Derived, Result >
 A generic binary operation on rangesUse this class as a convenience superclass when defining an operation for any image ranges. More...
struct  psynth::sound::detail::copy_fn< I, O >
class  psynth::sound::detail::copy_and_convert_frames_fn< CC >
struct  psynth::sound::detail::std_fill_type
 struct to do std::fill More...
struct  psynth::sound::detail::std_destruct_t
struct  psynth::sound::detail::has_trivial_frame_constructor< Range, IsPlanar >
struct  psynth::sound::detail::has_trivial_frame_constructor< Range, true >
struct  psynth::sound::detail::equal_n_fn< I1, I2 >
struct  psynth::sound::detail::equal_n_fn< const frame< T, Cs > *, const frame< T, Cs > * >
 Equal when both ranges are interleaved and of the same type. More...
struct  psynth::sound::detail::equal_n_fn< frame< T, Cs > *, frame< T, Cs > * >
struct  psynth::sound::detail::equal_n_fn< planar_frame_iterator< IC, Cs >, planar_frame_iterator< IC, Cs > >
 EqualFrames Equal when both ranges are planar pointers of the same type. More...

Namespaces

namespace  psynth
namespace  psynth::sound
namespace  std
namespace  psynth::sound::detail
 

interleaved_range_get_raw_data, planar_range_get_raw_data - return pointers to the raw data (the samples) of a basic homogeneous range.


Functions

template<typename T , typename Cs >
PSYNTH_FORCEINLINE
psynth::sound::frame< T, Cs > * 
std::copy (psynth::sound::frame< T, Cs > *first, psynth::sound::frame< T, Cs > *last, psynth::sound::frame< T, Cs > *dst)
 Copy when both src and dst are interleaved and of the same type can be just memmove.
template<typename T , typename Cs >
PSYNTH_FORCEINLINE
psynth::sound::frame< T, Cs > * 
std::copy (const psynth::sound::frame< T, Cs > *first, const psynth::sound::frame< T, Cs > *last, psynth::sound::frame< T, Cs > *dst)
 Copy when both src and dst are interleaved and of the same type can be just memmove.
template<typename Cs , typename IC1 , typename IC2 >
PSYNTH_FORCEINLINE
psynth::sound::planar_frame_iterator
< IC2, Cs > 
std::copy (psynth::sound::planar_frame_iterator< IC1, Cs > first, psynth::sound::planar_frame_iterator< IC1, Cs > last, psynth::sound::planar_frame_iterator< IC2, Cs > dst)
 Copy when both src and dst are planar pointers is copy for each sample.
template<typename Range1 , typename Range2 >
PSYNTH_FORCEINLINE void psynth::sound::copy_frames (const Range1 &src, const Range2 &dst)
 std::copy for image ranges
template<typename V1 , typename V2 , typename CC >
PSYNTH_FORCEINLINE void psynth::sound::copy_and_convert_frames (const V1 &src, const V2 &dst, CC cc)
template<typename Range1 , typename Range2 >
PSYNTH_FORCEINLINE void psynth::sound::copy_and_convert_frames (const Range1 &src, const Range2 &dst)
template<typename It , typename P >
PSYNTH_FORCEINLINE void psynth::sound::detail::fill_aux (It first, It last, const P &p, boost::mpl::true_)
 std::fill for planar iterators
template<typename It , typename P >
PSYNTH_FORCEINLINE void psynth::sound::detail::fill_aux (It first, It last, const P &p, boost::mpl::false_)
 std::fill for interleaved iterators
template<typename Range , typename Value >
PSYNTH_FORCEINLINE void psynth::sound::fill_frames (const Range &buf_range, const Value &val)
 std::fill for image ranges
template<typename Range , typename Value >
PSYNTH_FORCEINLINE void psynth::sound::fill_frames (Range &buf_range, const Value &val)
 std::fill for image ranges
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::destruct_range_impl (It first, It last, boost::mpl::true_)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::destruct_range_impl (It, It, boost::mpl::false_)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::destruct_range (It first, It last)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::destruct_aux (It first, It last, boost::mpl::true_)
 destruct for planar iterators
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::destruct_aux (It first, It last, boost::mpl::false_)
 destruct for interleaved iterators
template<typename Range >
PSYNTH_FORCEINLINE void psynth::sound::destruct_frames (const Range &buf_range)
 Invokes the in-place destructor on every frame of the range.
template<typename It , typename P >
PSYNTH_FORCEINLINE void psynth::sound::detail::uninitialized_fill_aux (It first, It last, const P &p, boost::mpl::true_)
 std::uninitialized_fill for planar iterators If an exception is thrown destructs any in-place copy-constructed objects
template<typename It , typename P >
PSYNTH_FORCEINLINE void psynth::sound::detail::uninitialized_fill_aux (It first, It last, const P &p, boost::mpl::false_)
 std::uninitialized_fill for interleaved iterators If an exception is thrown destructs any in-place copy-constructed objects
template<typename Range , typename Value >
PSYNTH_FORCEINLINE void psynth::sound::uninitialized_fill_frames (const Range &buf_range, const Value &val)
 std::uninitialized_fill for image ranges.
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::default_construct_range_impl (It first, It last, boost::mpl::true_)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::default_construct_range_impl (It, It, boost::mpl::false_)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::default_construct_range (It first, It last)
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::default_construct_aux (It first, It last, boost::mpl::true_)
 uninitialized_default_construct for planar iterators
template<typename It >
PSYNTH_FORCEINLINE void psynth::sound::detail::default_construct_aux (It first, It last, boost::mpl::false_)
 uninitialized_default_construct for interleaved iterators
template<typename Range >
PSYNTH_FORCEINLINE void psynth::sound::default_construct_frames (const Range &buf_range)
 Invokes the in-place default constructor on every frame of the (uninitialized) range.
template<typename It1 , typename It2 >
PSYNTH_FORCEINLINE void psynth::sound::detail::uninitialized_copy_aux (It1 first1, It1 last1, It2 first2, boost::mpl::true_)
 std::uninitialized_copy for pairs of planar iterators
template<typename It1 , typename It2 >
PSYNTH_FORCEINLINE void psynth::sound::detail::uninitialized_copy_aux (It1 first1, It1 last1, It2 first2, boost::mpl::false_)
 std::uninitialized_copy for interleaved or mixed iterators
template<typename Range1 , typename Range2 >
PSYNTH_FORCEINLINE void psynth::sound::uninitialized_copy_frames (const Range1 &range1, const Range2 &range2)
 std::uninitialized_copy for image ranges.
template<typename V , typename F >
PSYNTH_FORCEINLINE F psynth::sound::for_each_frame (const V &buf, F fun)
template<typename Range , typename F >
PSYNTH_FORCEINLINE F psynth::sound::for_each_frame_position (const Range &buf, F fun)
template<typename Range , typename F >
PSYNTH_FORCEINLINE void psynth::sound::generate_frames (const Range &v, F fun)
template<typename I1 , typename I2 >
PSYNTH_FORCEINLINE bool psynth::sound::equal_n (I1 i1, std::ptrdiff_t n, I2 i2)
template<typename Range1 , typename Range2 >
PSYNTH_FORCEINLINE bool psynth::sound::equal_frames (const Range1 &v1, const Range2 &v2)
 std::equal for image ranges
template<typename Range1 , typename Range2 , typename F >
PSYNTH_FORCEINLINE F psynth::sound::transform_frames (const Range1 &src, const Range2 &dst, F fun)
template<typename Range1 , typename Range2 , typename Range3 , typename F >
PSYNTH_FORCEINLINE F psynth::sound::transform_frames (const Range1 &src1, const Range2 &src2, const Range3 &dst, F fun)
 transform_frames with two sources
template<typename Range1 , typename Range2 , typename F >
PSYNTH_FORCEINLINE F psynth::sound::transform_frame_positions (const Range1 &src, const Range2 &dst, F fun)
template<typename Range1 , typename Range2 , typename Range3 , typename F >
PSYNTH_FORCEINLINE F psynth::sound::transform_frame_positions (const Range1 &src1, const Range2 &src2, const Range3 &dst, F fun)
 transform_frame_positions with two sources

Detailed Description

Time-stamp: <2011-04-01 13:13:44 raskolnikov>

Author:
Juan Pedro Bolivar Puente <raskolnikov@es.gnu.org>
Date:
Tue Oct 19 13:09:08 2010

Basic STL-like algorithms applied to sound buffers.

Todo:
With range STL algorithms of C++0x the _frames versions become trivial. Range based algorithms are not implemented in GCC yet though (as of GCC 4.4.X).