Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mandelbrot-explorer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ильин Владимир Александрович
mandelbrot-explorer
Commits
be97187c
You need to sign in or sign up before continuing.
Commit
be97187c
authored
Feb 18, 2025
by
Ильин Владимир Александрович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bruh bulb check gave +5fps
parent
1ebae6b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
gmon.out
gmon.out
+0
-0
mandelbrot
mandelbrot
+0
-0
mandelbrot.c
src/mandelbrot.c
+15
-0
No files found.
gmon.out
View file @
be97187c
No preview for this file type
mandelbrot
View file @
be97187c
No preview for this file type
src/mandelbrot.c
View file @
be97187c
...
...
@@ -11,6 +11,7 @@
#include <complex.h>
#include <CL/cl.h>
#include <omp.h>
#include <x86intrin.h>
#include "mandelbrot.h"
#include "mouse.h"
...
...
@@ -20,13 +21,21 @@
* 1. Store iterations instead of colors ?
* 1.1 memory usage vs performance loss ??? (cant draw in parallel anyway)
* 2. Look into SDL2 rendering
* 2.1 texture tendering DONE
* 2.2 fix colors ???
* 3. employ SSE2
* 3.1 x86intrin.h
* 3.2 inline assembly
*/
int
mandelbrot
(
Complex
c
)
{
// builb check
if
((
c
.
real
+
1
.
0
)
*
(
c
.
real
+
1
.
0
)
+
c
.
imag
*
c
.
imag
<=
0
.
25
)
return
MAX_ITERATIONS
;
Complex
z
=
{
0
.
0
,
0
.
0
};
int
i
;
...
...
@@ -185,6 +194,12 @@ main(void)
case
SDL_WINDOWEVENT
:
if
(
event
.
window
.
event
==
SDL_WINDOWEVENT_RESIZED
){
SDL_GetWindowSize
(
app
.
window
,
&
app
.
win_width
,
&
app
.
win_height
);
SDL_DestroyTexture
(
app
.
texture
);
app
.
texture
=
SDL_CreateTexture
(
app
.
renderer
,
SDL_PIXELFORMAT_RGBA8888
,
SDL_TEXTUREACCESS_STREAMING
,
app
.
win_width
,
app
.
win_height
);
}
break
;
case
SDL_KEYDOWN
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment