summaryrefslogtreecommitdiff
path: root/src/gallium/frontends/clover/api/invalid.cpp
blob: cecf1a095a58b77cb411db55cb5c8f30a38e2821 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//
// Copyright 2020 Red Hat
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//

#include "api/util.hpp"
#include "core/context.hpp"
#include "core/platform.hpp"

using namespace clover;

// This contains all the CL 2.x API entrypoints that return INVALID_OPERATON
// on CL 3.0. If these are implemented they should be moved out of this file.

CLOVER_API cl_mem
clCreatePipe(cl_context d_ctx,
	     cl_mem_flags flags,
	     cl_uint pipe_packet_size,
	     cl_uint pipe_max_packets,
	     const cl_pipe_properties *properties,
	     cl_int *r_errorcode) {
   *r_errorcode = CL_INVALID_OPERATION;
   return nullptr;
}


CLOVER_API cl_int
clGetPipeInfo(cl_mem pipe,
	      cl_pipe_info param_name,
	      size_t param_value_size,
	      void *param_value,
	      size_t *param_value_size_ret) {
   return CL_INVALID_MEM_OBJECT;
}

CLOVER_API cl_int
clGetDeviceAndHostTimer(cl_device_id device,
			cl_ulong *device_timestamp,
			cl_ulong *host_timestamp) {
   return CL_INVALID_OPERATION;
}

CLOVER_API cl_int
clGetHostTimer(cl_device_id device,
	       cl_ulong *host_timestamp) {
   return CL_INVALID_OPERATION;
}


CLOVER_API cl_int
clGetKernelSubGroupInfo(cl_kernel d_kern,
			cl_device_id device,
			cl_kernel_sub_group_info param_name,
			size_t input_value_size,
			const void *input_value,
			size_t param_size_value,
			void *param_value,
			size_t *param_value_size_ret) {
   return CL_INVALID_OPERATION;
}


CLOVER_API cl_int
clSetDefaultDeviceCommandQueue(cl_context context,
			       cl_device_id device,
			       cl_command_queue command_queue) {
   return CL_INVALID_OPERATION;
}

CLOVER_API cl_int
clSetProgramReleaseCallback(cl_program d_prog,
			    void (CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
			    void *user_data) {
   return CL_INVALID_OPERATION;
}

CLOVER_API cl_program
clCreateProgramWithIL(cl_context context,
		      const void *il,
		      size_t length,
		      cl_int *r_errorcode) {
   *r_errorcode = CL_INVALID_OPERATION;
   return nullptr;
}

CLOVER_API cl_int
clSetProgramSpecializationConstant(cl_program program,
				   cl_uint spec_id,
				   size_t spec_size,
				   const void* spec_value) {
   return CL_INVALID_OPERATION;
}