-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathocl_set_env.c
More file actions
28 lines (25 loc) · 1.16 KB
/
ocl_set_env.c
File metadata and controls
28 lines (25 loc) · 1.16 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ocl_set_env.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ehugh-be <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/19 19:36:13 by ehugh-be #+# #+# */
/* Updated: 2019/03/19 19:36:13 by ehugh-be ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void ft_ocl_set_env(t_ocl *ocl)
{
cl_int err;
int i;
ocl->kern = malloc(sizeof(cl_kernel) * FRCTL_NUM);
i = -1;
while (g_kernels[++i])
{
ocl->kern[i] = clCreateKernel(ocl->program, g_kernels[i], &err);
if (err < 0)
ft_ocl_err_handler(FT_OCL_KERNEL_ERR);
}
}