SWDEV-472710 - Adding gitattributes and remove trailing spaces

Change-Id: Ic8ad2071745f0ffe6a2e120bfebb6d90bf270f87


[ROCm/clr commit: dd30e0e893]
This commit is contained in:
Julia Jiang
2024-07-10 15:30:15 -04:00
committed by Julia Jiang
orang tua 3623e54842
melakukan 3c7ae28776
10 mengubah file dengan 35 tambahan dan 15 penghapusan
+20
Melihat File
@@ -0,0 +1,20 @@
# Set the default behavior, in case people don't have core.autolf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to have LF line endings on checkout.
*.c text eol=lf
*.cpp text eol=lf
*.cc text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.txt text eol=lf
# Define files to support auto-remove trailing white space
# Need to run the command below, before add modified file(s) to the staging area
# git config filter.trimspace.clean 'sed -e "s/[[:space:]]*$//g"'
*.cpp filter=trimspace
*.c filter=trimspace
*.h filter=trimspacecpp
*.hpp filter=trimspace
*.md filter=trimspace
@@ -111,7 +111,7 @@ inline hip_impl::kernarg make_kernarg(
kernarg.reserve(sizeof(to_formals));
auto& ps = hip_impl::get_program_state();
return make_kernarg<0>(to_formals,
return make_kernarg<0>(to_formals,
ps.get_kernargs_size_align(
reinterpret_cast<std::uintptr_t>(kernel)),
std::move(kernarg));
@@ -130,7 +130,7 @@ void hipLaunchKernelGGLImpl(
hipStream_t stream,
void** kernarg) {
const auto& kd = hip_impl::get_program_state().kernel_descriptor(function_address,
const auto& kd = hip_impl::get_program_state().kernel_descriptor(function_address,
target_agent(stream));
hipModuleLaunchKernel(kd, numBlocks.x, numBlocks.y, numBlocks.z,
@@ -84,7 +84,7 @@ struct is_callable_impl<F(Ts...), void_t_<typename std::result_of<F(Ts...)>::typ
template <class Base, class T, class Derived>
auto simple_invoke(T Base::*pmd, Derived&& ref)
-> decltype(static_cast<Derived&&>(ref).*pmd);
template <class PMD, class Pointer>
auto simple_invoke(PMD&& pmd, Pointer&& ptr)
-> decltype((*static_cast<Pointer&&>(ptr)).*static_cast<PMD&&>(pmd));
@@ -92,11 +92,11 @@ auto simple_invoke(PMD&& pmd, Pointer&& ptr)
template <class Base, class T, class Derived>
auto simple_invoke(T Base::*pmd, const std::reference_wrapper<Derived>& ref)
-> decltype(ref.get().*pmd);
template <class Base, class T, class Derived, class... Args>
auto simple_invoke(T Base::*pmf, Derived&& ref, Args&&... args)
-> decltype((static_cast<Derived&&>(ref).*pmf)(static_cast<Args&&>(args)...));
template <class PMF, class Pointer, class... Args>
auto simple_invoke(PMF&& pmf, Pointer&& ptr, Args&&... args)
-> decltype(((*static_cast<Pointer&&>(ptr)).*static_cast<PMF&&>(pmf))(static_cast<Args&&>(args)...));
@@ -106,7 +106,7 @@ auto simple_invoke(T Base::*pmf, const std::reference_wrapper<Derived>& ref, Arg
-> decltype((ref.get().*pmf)(static_cast<Args&&>(args)...));
template<class F, class... Ts>
auto simple_invoke(F&& f, Ts&&... xs)
auto simple_invoke(F&& f, Ts&&... xs)
-> decltype(f(static_cast<Ts&&>(xs)...));
template <typename, typename = void>
@@ -95,7 +95,7 @@ class CodeObject {
static hipError_t extractCodeObjectFromFatBinary(const void*,
const std::vector<std::string>&,
std::vector<std::pair<const void*, size_t>>&);
CodeObject() {}
private:
friend const std::vector<hipModule_t>& modules();
+3 -3
Melihat File
@@ -354,9 +354,9 @@ const char *ihipGetErrorString(hipError_t hip_error) {
}
}
const char* hipGetErrorName(hipError_t hip_error)
{
return ihipGetErrorName(hip_error);
const char* hipGetErrorName(hipError_t hip_error)
{
return ihipGetErrorName(hip_error);
}
const char *hipGetErrorString(hipError_t hip_error)
+1 -1
Melihat File
@@ -328,7 +328,7 @@ hipError_t ihipLaunchKernelCommand(amd::Command*& command, hipFunction_t f,
kernelCommand->release();
return hipErrorOutOfMemory;
}
} else {
for (size_t i = 0; i < kernel->signature().numParameters(); ++i) {
const amd::KernelParameterDescriptor& desc = kernel->signature().at(i);
+1 -1
Melihat File
@@ -36,7 +36,7 @@ class GenericAllocation : public amd::RuntimeObject {
hipMemAllocationProp properties_; //<! Allocation Properties
public:
GenericAllocation(amd::Memory& phys_mem_ref, size_t size, const hipMemAllocationProp& prop)
GenericAllocation(amd::Memory& phys_mem_ref, size_t size, const hipMemAllocationProp& prop)
: phys_mem_ref_(phys_mem_ref), size_(size), properties_(prop) {}
~GenericAllocation() {}
@@ -134,7 +134,7 @@ void OCLDeviceQueries::open(unsigned int test, char* units, double& conversion,
break;
}
}
if (!deviceFound) {
char msg[256];
SNPRINTF(msg, sizeof(msg), "Unsupported device(%s) for the test!\t",
+1 -1
Melihat File
@@ -686,7 +686,7 @@ class Settings : public amd::HeapObject {
uint rocr_backend_ : 1; //!< Device uses ROCr backend for submissions
uint gwsInitSupported_:1; //!< Check if GWS is supported on this machine.
uint kernel_arg_opt_: 1; //!< Enables kernel arg optimization for blit kernels
uint kernel_arg_impl_ : 2; //!< Kernel argument implementation
uint kernel_arg_impl_ : 2; //!< Kernel argument implementation
uint reserved_ : 7;
};
uint value_;
@@ -2358,7 +2358,7 @@ void* Device::deviceLocalAlloc(size_t size, bool atomics, bool pseudo_fine_grain
bool contiguous) const {
const hsa_amd_memory_pool_t& pool = (pseudo_fine_grain && gpu_ext_fine_grained_segment_.handle)
? gpu_ext_fine_grained_segment_
? gpu_ext_fine_grained_segment_
: (atomics && gpu_fine_grained_segment_.handle)
? gpu_fine_grained_segment_ : gpuvm_segment_;