Untitled Paste

cpp
Wrap Lines
Raw
template<typename T>
std::vector<T> getDeviceProp(cl_device_id devId, cl_device_info devProp)
{
	size_t propSize = 0;
	OCL_SAFE_CALL(clGetDeviceInfo(devId, devProp, 0, nullptr, &propSize));
	std::vector<T> propData(propSize);

	OCL_SAFE_CALL(clGetDeviceInfo(devId, devProp, propSize, propData.data(), nullptr));
	return propData;
}