47 lines · plain
1//===-- Program.td - Program definitions for Offload -------*- tablegen -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file contains Offload API definitions related to the program handle10//11//===----------------------------------------------------------------------===//12 13def olCreateProgram : Function {14 let desc = "Create a program for the device from the binary image pointed to by `ProgData`.";15 let details = [16 "The provided `ProgData` will be copied and need not outlive the returned handle",17 ];18 let params = [19 Param<"ol_device_handle_t", "Device", "handle of the device", PARAM_IN>,20 Param<"const void*", "ProgData", "pointer to the program binary data", PARAM_IN>,21 Param<"size_t", "ProgDataSize", "size of the program binary in bytes", PARAM_IN>,22 Param<"ol_program_handle_t*", "Program", "output pointer for the created program", PARAM_OUT>23 ];24 let returns = [];25}26 27def olIsValidBinary : Function {28 let desc = "Validate if the binary image pointed to by `ProgData` is compatible with the device.";29 let details = ["The provided `ProgData` will not be loaded onto the device"];30 let params = [31 Param<"ol_device_handle_t", "Device", "handle of the device", PARAM_IN>,32 Param<"const void*", "ProgData", "pointer to the program binary data", PARAM_IN>,33 Param<"size_t", "ProgDataSize", "size of the program binary in bytes", PARAM_IN>,34 Param<"bool*", "Valid", "output is true if the image is compatible", PARAM_OUT>35 ];36 let returns = [];37}38 39def olDestroyProgram : Function {40 let desc = "Destroy the program and free all underlying resources.";41 let details = [];42 let params = [43 Param<"ol_program_handle_t", "Program", "handle of the program", PARAM_IN>44 ];45 let returns = [];46}47