Files
compute-runtime/shared/source/helpers/file_io.h
Kacper Nowak c7adbc2140 Add debug key for dumping ELF to file
Add "DumpZEBin" debug flag. When this flag is enabled, Zebin will be
dumped to a .elf file (with appropiate suffix, in case such file has
been dumped before).
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-7895
2023-04-18 20:40:25 +02:00

26 lines
565 B
C++

/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
#include <memory>
#include <string>
std::unique_ptr<char[]> loadDataFromFile(
const char *filename,
size_t &retSize);
size_t writeDataToFile(
const char *filename,
const void *pData,
size_t dataSize);
bool fileExists(const std::string &fileName);
bool fileExistsHasSize(const std::string &fileName);
void dumpFileIncrement(const char *data, size_t dataSize, const std::string &filename, const std::string &extension);