joel_f
|
codepad
|
|
joel_f
|
Saved pastes by joel_f:
template<class Xpr, class T, class Reducer>
T fold(Xpr expr, T init, Reducer reducer)
{
#pragma omp parallel
{
|
view (14 lines) |
#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) |
#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) |
#include <iostream>
using namespace std;
struct fundamental_ {};
struct arithmetic_ : fundamental_{};
|
view (18 lines, 3 lines of output) |
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <stdlib.h>
#include <vector>
|
view (276 lines) |
windows<dialog> w;
w = frame("Choose a File to Open")
[
listbox<columns,no_icons>(pos_x,pos_y)
|
view (12 lines) |
#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) |
#include <cstddef>
template< class Type
, std::size_t Size = 1024*1024
, std::size_t ID = sizeof(Type)
|
view (80 lines, 22 lines of output) |
#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) |
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) |
#include <iostream>
#include <boost/timer.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/random/uniform_int.hpp>
|
view (220 lines) |
#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) |
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) |
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) |
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) |
#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) |
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) |
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) |
#include <iostream>
#include <boost/mpl/bool.hpp>
#include <boost/preprocessor/cat.hpp>
using namespace std;
|
view (45 lines, 2 lines of output) |
#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) |
#include <iostream>
#include <boost/proto/proto.hpp>
#include <boost/lexical_cast.hpp>
using namespace std;
|
view (319 lines) |
#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) |
#ifndef BOOST_MPL_SWITCH_HPP_INCLUDED
#define BOOST_MPL_SWITCH_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
|
view (48 lines) |