Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

In demo code, show CL_PROGRAM_BUILD_LOG if ccl_program_build fails #42

@shusheer

Description

@shusheer

Many folks will probably use the example code as the basis for their first projects - which will likely have bugs in kernels.

Make life easier for them by replacing eg. this code

	ccl_program_build(prg, NULL, &err);
	HANDLE_ERROR(err);

with this code:

	ccl_program_build(prg, NULL, &err);
	if (err != NULL)
	{
		CCLErr* err2 = NULL;
		fprintf(stderr, "\n%s\nBuild Error: Log Start\n", err->message);
		char* log = ccl_program_get_build_info_array(prg, dev, CL_PROGRAM_BUILD_LOG, char*, &err2);
		fprintf(stderr, "\n%s\nBuild Log End\n", log);
		HANDLE_ERROR(err2);
	}
	HANDLE_ERROR(err);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions