-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmandelmain.h
50 lines (40 loc) · 1.02 KB
/
mandelmain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef MANDELMAIN_H
#define MANDELMAIN_H
#define INITIAL_WINDOW_WIDTH (2048)
#define INITIAL_WINDOW_HEIGHT (2048)
#define MAX_SHADER_SIZE 100000
#include "mandelcpu.h"
#include <SDL2/SDL.h>
#include <SDL2/SDL_stdinc.h>
#include <cglm/cglm.h>
#include <immintrin.h>
#include <stdio.h>
#include <sys/param.h>
#include <GL/glew.h>
#include <gmp.h>
enum rendertargets {
TARGET_CPU,
TARGET_AVX,
TARGET_CUDASP,
TARGET_CUDA,
TARGET_GMP
};
struct RenderSettings {
uint32_t *outputBuffer;
int width;
int height;
double zoom;
double xoffset;
double yoffset;
unsigned int iterations;
uint32_t *deviceBuffer;
};
void mandelbrotCPU(struct RenderSettings rs);
void mandelbrotAVX(struct RenderSettings rs);
void mandelbrotGMP(struct RenderSettings rs);
void mandelbrotCUDA(struct RenderSettings rs);
void mandelbrotCUDAsp(struct RenderSettings rs);
void initCUDA(struct RenderSettings rs);
void freeCUDA();
void renderWindow(SDL_Renderer *rend, SDL_Texture *tex, struct RenderSettings rs);
#endif