implemented multithreading, but with mutex. will mit atomic operations optimieren
This commit is contained in:
+7
-1
@@ -9,6 +9,8 @@
|
||||
#include <stdlib.h>
|
||||
#include "interface.h"
|
||||
#include "helper.h"
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void example_color(int width, int height, int channels, unsigned char **image) {
|
||||
for (int i = 0; i < height * width; i++) {
|
||||
@@ -113,7 +115,11 @@ void exampleCornell( int width, int height, int channels, unsigned char **image)
|
||||
objectList[18] = (object){1, &(makroObj3.quad6), 0};
|
||||
|
||||
|
||||
|
||||
clock_t startTime = clock();
|
||||
displaySzene(objectList, objectCount, cam1, width, height, channels, image);
|
||||
clock_t endTime = clock();
|
||||
double elapsedTime = (endTime - startTime)/(double)CLOCKS_PER_SEC;
|
||||
printf("%.3lf\n", elapsedTime);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user