Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: support boost 1.81 #611

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/luxrays/utils/cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/nowide/fstream.hpp>

#include "luxrays/luxrays.h"
#include "luxrays/utils/utils.h"
Expand Down Expand Up @@ -174,10 +175,10 @@ bool cudaKernelPersistentCache::CompilePTX(const vector<string> &kernelsParamete

// The use of boost::filesystem::path is required for UNICODE support: fileName
// is supposed to be UTF-8 encoded.
boost::filesystem::ofstream file(boost::filesystem::path(fileName),
boost::filesystem::ofstream::out |
boost::filesystem::ofstream::binary |
boost::filesystem::ofstream::trunc);
boost::nowide::ofstream file(boost::filesystem::path(fileName),
boost::nowide::ofstream::out |
boost::nowide::ofstream::binary |
boost::nowide::ofstream::trunc);

// Write the binary hash
const u_int hashBin = oclKernelPersistentCache::HashBin(*ptx, *ptxSize);
Expand Down Expand Up @@ -206,8 +207,8 @@ bool cudaKernelPersistentCache::CompilePTX(const vector<string> &kernelsParamete

// The use of boost::filesystem::path is required for UNICODE support: fileName
// is supposed to be UTF-8 encoded.
boost::filesystem::ifstream file(boost::filesystem::path(fileName),
boost::filesystem::ifstream::in | boost::filesystem::ifstream::binary);
boost::nowide::ifstream file(boost::filesystem::path(fileName),
boost::nowide::ifstream::in | boost::nowide::ifstream::binary);

// Read the binary hash
u_int hashBin;
Expand Down
13 changes: 7 additions & 6 deletions src/luxrays/utils/ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/nowide/fstream.hpp>

#include "luxrays/luxrays.h"
#include "luxrays/utils/utils.h"
Expand Down Expand Up @@ -303,10 +304,10 @@ cl_program oclKernelPersistentCache::Compile(cl_context context, cl_device_id de

// The use of boost::filesystem::path is required for UNICODE support: fileName
// is supposed to be UTF-8 encoded.
boost::filesystem::ofstream file(boost::filesystem::path(fileName),
boost::filesystem::ofstream::out |
boost::filesystem::ofstream::binary |
boost::filesystem::ofstream::trunc);
boost::nowide::ofstream file(boost::filesystem::path(fileName),
boost::nowide::ofstream::out |
boost::nowide::ofstream::binary |
boost::nowide::ofstream::trunc);

// Write the binary hash
const u_int hashBin = HashBin(bins, binsSizes[0]);
Expand Down Expand Up @@ -337,8 +338,8 @@ cl_program oclKernelPersistentCache::Compile(cl_context context, cl_device_id de

// The use of boost::filesystem::path is required for UNICODE support: fileName
// is supposed to be UTF-8 encoded.
boost::filesystem::ifstream file(boost::filesystem::path(fileName),
boost::filesystem::ifstream::in | boost::filesystem::ifstream::binary);
boost::nowide::ifstream file(boost::filesystem::path(fileName),
boost::nowide::ifstream::in | boost::nowide::ifstream::binary);

// Read the binary hash
u_int hashBin;
Expand Down