[ create a new paste ] login | about

joel_f

Name: Joel Falcou
Email:
Site/Blog:
Location: Paris
Default language: C++
Favorite languages: C++
About:

Saved pastes by joel_f:

C++, pasted on Mar 5:
1
2
3
4
5
template<class Xpr, class T, class Reducer>
T fold(Xpr expr, T init, Reducer reducer)
 {
   #pragma omp parallel
   {
...
view (14 lines)
C++, pasted on Mar 5:
1
2
3
4
5
 int factorial(int number)
 {
   int fac = 1;
   #pragma omp parallel
   {
...
view (14 lines)
C++, pasted on Feb 17:
1
2
3
4
5
#include <complex>  
void Mandelbrot(float x1, float y1, float x2, float y2,   
                   int width, int height, int maxIters, unsigned short * image)  
{  
    float dx = (x2-x1)/width, dy = (y2-y1)/height;  
...
view (15 lines)
C++, pasted on Mar 12:
1
2
3
4
5
int main()
{
   boost::tuple< std::vector<float>                 
               , std::vector<int>                   
               >                              data;
...
view (46 lines, 10 lines of output)
C++, pasted on Jan 6:
1
2
3
4
5
#include <iostream>

template<class F, int I, int N, int Step = 1, bool Stop = (Step>0) ? (I < N) : (N < I)>
struct for_
{
...
view (31 lines, 27 lines of output)
C++, pasted on Nov 25:
1
2
3
4
5
#include <iostream>
using namespace std;

struct fundamental_ {};
struct arithmetic_  : fundamental_{};
...
view (18 lines, 3 lines of output)
C++, pasted on Apr 21:
1
2
3
4
5
struct number;

struct power_number
{
  power_number(number const& n_) : n(n_){}
...
view (46 lines, 1 line of output)
C++, pasted on Apr 6:
1
2
3
4
5
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <stdlib.h>
#include <vector>
...
view (276 lines)
C++, pasted on Apr 3:
1
2
3
4
5
windows<dialog> w;

w = frame("Choose a File to Open")
    [
      listbox<columns,no_icons>(pos_x,pos_y)
...
view (12 lines)
C++, pasted on Apr 1:
1
2
3
4
5
#include <iostream>

struct X
{
    X() : id(instances++)
...
view (127 lines, 139 lines of output)
C++, pasted on Nov 22:
1
2
3
4
struct coord
{
  float x,y;
};
...
view (44 lines)
C++, pasted on Nov 20:
1
2
3
4
5
#include <iostream>

template<int I, int N,class F>
struct for_
{
...
view (25 lines, 10 lines of output)
C++, pasted on Nov 1:
1
2
3
4
#include <boost/mpl/bool.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/function_types/member_function_pointer.hpp>
...
view (66 lines)
C++, pasted on Oct 26:
1
2
3
4
5
#include <cstddef>

template< class Type
        , std::size_t Size = 1024*1024
        , std::size_t ID = sizeof(Type)
...
view (80 lines, 22 lines of output)
C++, pasted on Oct 26:
1
2
3
4
5
#include <cstddef>

template< class Type
        , std::size_t Size = 1024*1024*sizeof(Type)
        , std::size_t ID = sizeof(Type)
...
view (59 lines, 3 lines of output)
C++, pasted on Aug 26:
1
2
3
4
5
struct some_exception {};

template<class T,size_t N> struct aligned_ptr
{
  public:
...
view (47 lines)
C++, pasted on Aug 26:
1
2
3
4
5
template<class T> struct aligned_ptr_reference        { typedef T& type;    };
template<>        struct aligned_ptr_reference<void>  { typedef void type;  };

template<class T,size_t N> struct alignement_traits
{
...
view (74 lines, 2 lines of output)
C++, pasted on Aug 18:
1
2
3
4
5
#include <iostream>
#include <boost/timer.hpp>

#include <boost/random/linear_congruential.hpp>
#include <boost/random/uniform_int.hpp>
...
view (220 lines)
C++, pasted on Aug 16:
1
2
3
4
#include <cstring>
#include <iostream>

using namespace std;
...
view (164 lines)
C, pasted on Jul 20:
1
2
3
4
5
#include <string.h>
#include <stdio.h>

float** alloc_array( int h, int w )
{
...
view (43 lines, 3 lines of output)
C++, pasted on Jul 19:
1
2
3
4
5
#include<boost/mpl/vector.hpp>
#include<boost/mpl/at.hpp>
#include<boost/mpl/transform.hpp>

template<class Seq>
...
view (17 lines, 3 lines of output)
C++, pasted on Jul 5:
1
2
3
4
5
template<class T> static inline T** alloc( size_t h, size_t w )
{
  typedef T* ptr_type;
  ptr_type* m;
  m    = new ptr_type[h];
...
view (39 lines)
C++, pasted on Jul 5:
1
2
3
4
5
template<class T> static inline T** alloc( size_t h, size_t w )
{
  typedef T* ptr_type;
  ptr_type* m;
  m    = new ptr_type[h];
...
view (39 lines, 3 lines of output)
C++, pasted on Jul 5:
1
2
3
4
5
template<class T> static inline T** alloc( size_t h, size_t w )
{
  typedef T* ptr_type;
  ptr_type* m;
  m    = new ptr_type[h];
...
view (35 lines)
C++, pasted on Jun 28:
1
2
3
4
5
#include <boost/integer.hpp>
#include <boost/type_traits/aligned_storage.hpp>

  template<int N=0> struct aligned_chunk
  {
...
view (75 lines, 4 lines of output)
C++, pasted on Jun 20:
1
2
3
4
5
template<class T> static inline T** alloc( size_t h, size_t w )
{
  typedef T* ptr_type;
  ptr_type* m;
  m    = new ptr_type[h];
...
view (25 lines)
C++, pasted on Jun 20:
1
2
3
4
5
template<class T> static inline T** alloc( size_t h, size_t w )
{
  typedef T* ptr_type;
  ptr_type* m;
  m    = new ptr_type[h];
...
view (20 lines)
C++, pasted on Jun 15:
1
2
3
4
5
#include <iostream>


template<class T, int Padding>
struct padded
...
view (51 lines, 3 lines of output)
C++, pasted on May 27:
1
2
3
4
5
#include <iostream>
#include <boost/mpl/bool.hpp>
#include <boost/preprocessor/cat.hpp>

using namespace std;
...
view (45 lines, 2 lines of output)
C++, pasted on Apr 8:
1
2
3
4
5
#include <iostream>
#include <boost/utility/enable_if.hpp>
#include <boost/mpl/greater.hpp>
#include <boost/mpl/comparison.hpp>
#include <boost/mpl/size_t.hpp>
...
view (79 lines, 3 lines of output)
C++, pasted on Feb 27:
1
2
3
4
5
#include <iostream>
#include <boost/version.hpp>

using namespace std;
int main()
...
view (8 lines, 1 line of output)
C++, pasted on Feb 27:
1
2
3
4
5
#include <iostream>
#include <boost/proto/proto.hpp>
#include <boost/lexical_cast.hpp>

using namespace std;
...
view (319 lines)
C++, pasted on Aug 23:
1
2
3
4
5
#include <boost/mpl/vector.hpp>
#include <boost/mpl/always.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/find.hpp>
#include <boost/mpl/switch.hpp>
...
view (32 lines)
C++, pasted on Aug 23:
1
2
3
4
5
#ifndef BOOST_MPL_SWITCH_HPP_INCLUDED
#define BOOST_MPL_SWITCH_HPP_INCLUDED

// Copyright Aleksey Gurtovoy 2003-2004
//
...
view (48 lines)
C++, pasted on Aug 11:
1
2
3
4
5
#include <iostream>
#include <boost/mpl/or.hpp>
#include <boost/mpl/has_xxx.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
...
view (79 lines, 4 lines of output)