Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Remove some dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Nov 27, 2019
1 parent 0dc2ac5 commit 5662fba
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions src/tensor/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,79 +256,6 @@ function contraction!(
return C
end

#function contraction!(
# alpha::Number, A::Array, Ainds::ModeType, opA::cutensorOperator_t,
# B::Array, Binds::ModeType, opB::cutensorOperator_t,
# beta::Number, C::Array, Cinds::ModeType, opC::cutensorOperator_t,
# pref::cutensorWorksizePreference_t=CUTENSOR_WORKSPACE_RECOMMENDED,
# algo::cutensorAlgo_t=CUTENSOR_ALGO_DEFAULT, stream::CuStream=CuDefaultStream())
#
# !is_unary(opA) && throw(ArgumentError("opA must be a unary op!"))
# !is_unary(opB) && throw(ArgumentError("opB must be a unary op!"))
# !is_unary(opC) && throw(ArgumentError("opC must be a unary op!"))
# descA = CuTensorDescriptor(A; op = opA)
# descB = CuTensorDescriptor(B; op = opB)
# descC = CuTensorDescriptor(C; op = opC)
# # for now, D must be identical to C (and thus, descD must be identical to descC)
# T = eltype(C)
# typeCompute = cudaDataType(T)
# modeA = collect(Cint, Ainds)
# modeB = collect(Cint, Binds)
# modeC = collect(Cint, Cinds)
#
# workspaceSize = Ref{UInt64}(C_NULL)
# cutensorContractionGetWorkspace(handle(), A, descA, modeA, B, descB, modeB, C, descC,
# modeC, C, descC, modeC, typeCompute, algo, pref,
# workspaceSize)
# workspace = CuArray{UInt8}(undef, 0)
# try
# workspace = CuArray{UInt8}(undef, workspaceSize[])
# catch
# workspace = CuArray{UInt8}(undef, 1<<27)
# end
# workspaceSize[] = length(workspace)
#
# cutensorContraction(handle(), T[alpha], A, descA, modeA, B, descB, modeB, T[beta], C,
# descC, modeC, C, descC, modeC, typeCompute, algo, CU_NULL, 0,
# stream)
# return C
#end
#
#function contraction!(
# alpha::Number, A::CuTensor, opA::cutensorOperator_t,
# B::CuTensor, opB::cutensorOperator_t,
# beta::Number, C::CuTensor, opC::cutensorOperator_t,
# pref::cutensorWorksizePreference_t=CUTENSOR_WORKSPACE_RECOMMENDED,
# algo::cutensorAlgo_t=CUTENSOR_ALGO_DEFAULT, stream::CuStream=CuDefaultStream())
#
# !is_unary(opA) && throw(ArgumentError("opA must be a unary op!"))
# !is_unary(opB) && throw(ArgumentError("opB must be a unary op!"))
# !is_unary(opC) && throw(ArgumentError("opC must be a unary op!"))
# descA = CuTensorDescriptor(A; op = opA)
# descB = CuTensorDescriptor(B; op = opB)
# descC = CuTensorDescriptor(C; op = opC)
# # for now, D must be identical to C (and thus, descD must be identical to descC)
# T = eltype(C)
# typeCompute = cudaDataType(T)
#
# workspaceSize = Ref{UInt64}(C_NULL)
# cutensorContractionGetWorkspace(handle(), A.data, descA, A.inds, B.data, descB, B.inds,
# C.data, descC, C.inds, C.data, descC, C.inds,
# typeCompute, algo, pref, workspaceSize)
# workspace = CuArray{UInt8}(undef, 0)
# try
# workspace = CuArray{UInt8}(undef, workspaceSize[])
# catch
# workspace = CuArray{UInt8}(undef, 1<<27)
# end
# workspaceSize[] = length(workspace)
#
# cutensorContraction(handle(), T[alpha], A.data, descA, A.inds, B.data, descB, B.inds,
# T[beta], C.data, descC, C.inds, C.data, descC, C.inds,
# typeCompute, algo, workspace, workspaceSize[], stream)
# return C
#end

function reduction!(
alpha::Number, A::CuArray, Ainds::ModeType, opA::cutensorOperator_t,
beta::Number, C::CuArray, Cinds::ModeType, opC::cutensorOperator_t,
Expand Down

0 comments on commit 5662fba

Please sign in to comment.