JayBeams  0.1
Another project to have fun coding.
Functions | Variables
ut_build_simple_kernel.cpp File Reference
#include <jb/opencl/build_simple_kernel.hpp>
#include <jb/opencl/device_selector.hpp>
#include <boost/compute/context.hpp>
#include <boost/test/unit_test.hpp>
#include <sstream>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (build_simple_kernel)
 
 BOOST_AUTO_TEST_CASE (build_simple_program)
 

Variables

char const valid_program []
 
char const invalid_program []
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( build_simple_kernel  )

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( build_simple_program  )

Variable Documentation

◆ invalid_program

char const invalid_program[]
Initial value:
= R"""(
__kernel void add_float(
__global float *dst, __global float const* src, unsigned int const N) {
int row = get_global_id(0);
if (row < N) {
dest[row] = dst[row] + src[row]; /* oops typo in the lhs */
}
}
)"""

Definition at line 29 of file ut_build_simple_kernel.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ valid_program

char const valid_program[]
Initial value:
= R"""(
__kernel void add_float(
__global float *dst, __global float const *src, unsigned int const N) {
int row = get_global_id(0);
if (row < N) {
dst[row] = dst[row] + src[row];
}
}
__kernel void add_int(
__global int *dst, __global int const *src,
unsigned int const N) {
int row = get_global_id(0);
if (row < N) {
dst[row] = dst[row] + src[row];
}
}
)"""

Definition at line 9 of file ut_build_simple_kernel.cpp.

Referenced by BOOST_AUTO_TEST_CASE().