sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
32523954ea8dcce440171e7c72d9d77a475336f127178fa425521562246a871b | CUDA | 22,590 | 609 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/SegmentReduce.h>
#include <cuda_runtime.h>
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/NumericUtils.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/KernelUtils.h>
#include <ATen/cuda/cub.cuh>
#ifndef AT_PER_O... |
23cc443ca6d70ef47604ead5a8d6796138f64f973193aeff640ee388385b2d19 | CUDA | 22,764 | 620 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/native/Pool.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <ATen/cuda/... |
7323c434c4b821cd4483a3427bce6f1e53d8e52a1b7716dbad8ca3cb02bd02cf | CUDA | 23,832 | 843 | #include "src/acc/settings.h"
#include "src/acc/cuda/cuda_kernels/cuda_device_utils.cuh"
#include "src/acc/cuda/cuda_kernels/helper.cuh"
#include "src/acc/cuda/cuda_settings.h"
#include <curand.h>
#include <curand_kernel.h>
/// Needed explicit template instantiations
template __global__ void cuda_kernel_make_eulers_2... |
e473f7f7f651f947d4cf40f59ad6a812d4ffaa45df0667da1457a978a38d8828 | CUDA | 24,356 | 582 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/DeviceUtils.cuh>
#include <ATen/native/EmbeddingBag.h>
#include <ATen/Ten... |
79b782dc9d6033ff22472d3f701661a6261e7956b4b5262898066d5399d5901e | CUDA | 24,898 | 833 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/cuda/im2col.cuh>
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/TensorMeta.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
#include <ATen/cuda/CUDABlas.h>
#include <ATen/cuda/CUDAContext... |
2c1fa940b4bc0be2637ebce7655cd1456eb7760b413737fcdb8383828717a3b9 | CUDA | 25,554 | 698 | #include <c10/core/ScalarType.h>
#include <c10/core/TensorOptions.h>
#include <c10/util/irange.h>
#include <limits>
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/ceil_div.h>
#include <ATen/native/ForeachUtils.h>
#includ... |
c877acb8014c5e120ff2de9af8834972119f8c1a547e6e998477d9c3be9d29d9 | CUDA | 26,291 | 668 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/Context.h>
#include <ATen/Dispatch.h>
#include <ATen/Dispatch_v2.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/CUDAEvent.h>
#include <ATen/cuda/CachingHostAllocator.h>
#include <ATen/cuda/PeerToPeerAccess.h>
#include <AT... |
98e97fd5231740572253a335fa8fd05546a7903c505ecd1c9f3bd8ac91e6b314 | CUDA | 27,297 | 698 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/ceil_div.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/MemoryOverlap.h>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/native/cuda/MemoryAccess.cuh>
#include <ATen/native/Resize.h>
#include <ATen/native/TypePropert... |
5058a385684a76b4dcb254b2f73d329ceacca19414ccc8b083b3478d9ae58e7e | CUDA | 27,307 | 826 | #include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/Dispatch.h>
#include <ATen/native/LinearAlgebraUtils.h>
#include <c10/cuda/CUDAStream.h>
#include <ATen/cuda/CUDABlas.h>
#include <c10/util/complex.h>
#include <ATen/native/cuda/MiscUtils.h>
#include <thrust/swap.h>
/*
The following fil... |
57e9f79770a0c4d77c9d2cd0fa59ce77928718d0690b62558178e49ccf54dc84 | CUDA | 27,978 | 667 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/TensorUtils.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <c10/macros/Macros.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Fun... |
08452fecd4be6b5c22b3d589127c0c441b61c6230a4ed5cd0593cd338c14c426 | CUDA | 28,378 | 753 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/TensorAdvancedIndexing.h>
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/ceil_div.h>
#include <ATen/MemoryOverlap.h>
#include <ATen/native/ScatterGatherChecks.h>
#include <ATen/native/ReduceOpsUtils.h>
#include <ATen/native/cuda/... |
057de28d8532f3b96e0759bf80cb56e518bc39e2276aaeb403c31bb741d0ed10 | CUDA | 28,625 | 705 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/cuda/detail/KernelUtils.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/AccumulateType.h>
#include <ATen/TensorUtils.h>
#include <ATen/native/ConvUtils.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <AT... |
7d754c2c844bf74140a1296773e9bf0f9eb4f66aff1714f74deb464a91da7b9d | CUDA | 29,411 | 554 | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/cuda/Loops.cuh>
#include <ATen/native/cuda/Math.cuh>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/BinaryOps.h>
// NOTE: CUDA on Windows requires that the enclosing function
// of a ... |
be41beddf43ded8c5664892804f4951bc5e8ec9f4422c38d5f01a3bf1be57d35 | CUDA | 30,077 | 839 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/native/Resize.h>
#include <ATen/native/TensorShape.h>
#include <c10/cuda/CUDAGraphsC10Utils.h>
#include <c10/util/TypeCast.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <A... |
b7ff795ab191b648e62e129f7597aec5ace0def878d1328dc7941875df7a9748 | CUDA | 31,407 | 1,022 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
#include <ATen/cuda/CUDABlas.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/native/ConvUtils.h>
#include <ATen/native/cuda/vo... |
67f6692da405e0bc829b91c71d71b3638076dfb066cedd5b71068304cd42552f | CUDA | 31,590 | 765 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/AccumulateType.h>
#include <ATen/div_rtn.h>
#include <ATen/cuda/CUDABlas.h>
#include <ATen/cuda/detail/KernelUtils.h>
#include <ATen/native/ConvUtils.h>
#include <ATen/native/cuda/block_reduce.cuh>
#includ... |
8030fd10d2a2e00acba57a8c9f49e58a231f2cfad62d2efeed99b9c87931fe05 | CUDA | 33,632 | 788 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/NumericUtils.h>
#include <ATen/native/Pool.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/NumericLimits.cuh>
#include <ATen/cuda/detai... |
2528a16deab1b1b503dca4b831cb96a7c3a723da037fa117c8ddcf792643627d | CUDA | 33,844 | 840 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/TensorUtils.h>
#include <ATen/OpMathType.h>
#include <ATen/Utils.h>
#include <c10/util/Exception.h>
#include <A... |
a4797d91d2f4391659ca70723f8b39e5250a0684536c6096539591e4a3c3ecb9 | CUDA | 34,261 | 976 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
#include <ATen/native/Padding... |
e6b1faa8b669fc12ebdec6d0ab0b7a869359a4619f5b0b9aa72ded758d839d8f | CUDA | 37,385 | 1,156 | #undef ALTCPU
#include <sys/time.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <ctime>
#include <iostream>
#include <fstream>
#include <cuda_runtime.h>
#include <signal.h>
#include "src/ml_optimiser.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojec... |
025050080c43975df2aeca10149b921454ee98d5620882a31e701c792ce1b4e6 | CUDA | 39,191 | 842 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/detail/CUDAHooksInterface.h>
#include <ATen/native/Normalization.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/ReduceOps.h>
#include <ATen/native/Resize.h>
#include <ATen/native/cuda/Loops.cuh>
#inclu... |
b85c7d0204e2be1cd1cd0005742087963f08e2c907248bd391d14b189b838c71 | CUDA | 39,471 | 1,135 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/nvrtc_stub/ATenNVRTC.h>
#include <c10/macros/Macros.h>
// Determine if the architecture supports rowwise scaled mm
// Currently failing on windows with:
// https://... |
f1c987672007344286c85a66e842c5dec211a8bdc1cc50b43e4fa45859bc06bf | CUDA | 39,725 | 814 | // Copyright (c) 2018 MathInf GmbH, Thomas Viehmann
// Licensed under the BSD-3-Clause license
// This is the GPU implementation of the Connectionist Temporal Loss.
// We mostly follow Graves.
// 1. Graves et al.: http://www.cs.toronto.edu/~graves/icml_2006.pdf
// We use the equations from above link, but note that [1]... |
db9e0060fd79b95f1487d06e8986be49c6f3cdee536b894d56b3559eeae64f73 | CUDA | 41,107 | 1,050 | // Adapted from interp.cpp from Caffe util by Pauline Luc
// Originally developed by George Papandreou
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
#in... |
02dde40cf3cee27a2c3ab2c202b13febb8428074a928ba9c1a577317a8b2d020 | CUDA | 47,333 | 1,374 | #if defined(USE_ROCM) || (defined(CUDA_VERSION) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 800)))
#include <cuda_bf16.h>
#include <cuda_fp16.h>
#include <cuda_runtime.h>
#if !defined(USE_ROCM)
#include <mma.h>
#endif
#endif
#include <ATen/ATen.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#i... |
55d01b174b911be6767e6f218cae0e5a3f40fce057c1d614b3b574880c980609 | CUDA | 49,218 | 1,417 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/group_norm.h>
#include <type_traits>
#include <utility>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/core/Tensor.h>
#include <ATen/native/SharedReduceOps.h>
#include <ATen/native/TensorIterator.h>
#include <c10/cuda/CUDAMat... |
239c7e235eb24c28045911c2ed303b5ce7e6865f7e452868775e34645154f680 | CUDA | 55,993 | 1,539 | #include <cuda_fp16.h>
#include <type_traits>
#include <cmath>
#include <limits>
#include <ATen/ATen.h>
#include <ATen/Dispatch.h>
#include <ATen/Dispatch_v2.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/KernelUtils.h>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/native/cuda/Loops.cuh>... |
bbff3b41dcb23082d4eb682a5f08e4a82429d45e3db18670660e9faf2c8d8249 | CUDA | 57,704 | 1,220 | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/OpMathType.h>
#include <ATen/native/cuda/GridSampler.h>
#include <ATen/native/GridSamplerUtils.h>
#include <ATen/native/cuda/GridSampler.cuh>
#include <ATen/native/cuda/UpSample.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <... |
5050e670112859306d220a6266eaec40b0342168af41c2301717da5e27166ab4 | CUDA | 67,085 | 1,644 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/Dispatch.h>
#include <ATen/TensorUtils.h>
#include <ATen/TensorOperators.h>
#include <ATen/WrapDimUtils.h>
#include <c10/macros/Macros.h>
#include <ATen/AccumulateType.h>
#include <ATen/cuda/Numer... |
4a52bc2171023e8916b93c6aca080e7879e928c3f24a14c7810c3175e4381cd4 | CUDA | 69,927 | 1,628 | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/native/cuda/TensorTopK.h>
#include <ATen/core/TensorBase.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <c10/macros/Macros.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <ATen/cuda/detail/OffsetCalculator.cuh>... |
0a214206fd98885a3121e32fa30cf835dce769ed52546412e9969e7bc386bd0f | CUDA | 77,030 | 2,105 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/layer_norm.h>
#include <tuple>
#include <type_traits>
#include <ATen/core/Tensor.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/native/cuda/bloc... |
829d4fa36eca096a4dc8cf3d9dfd5e28c0f552e86001a427d47daa484067fcf4 | CUDA | 86,401 | 2,046 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/TensorAdvancedIndexing.h>
#include <ATen/native/IndexingUtils.h>
#include <ATen/native/quantized/IndexKernel.h>
#include <ATen/native/cuda/KernelUtils.cuh>
#include <ATen/core/Tensor.h>
#include <ATen/ceil_div.h>
#include <ATen/Dispatch.h>
#include <ATen... |
41638b3eb4f1610bb5cab12dc9031b3347c4f4cd919977bb735f392a70f9c77a | Fortran | 51 | 3 | function hi()
print*, "Hello World"
end function
|
8bb635ce031747d6d2c678de61648319e09fb12e638b29fb04b6fec1bc23cf65 | Fortran | 92 | 5 | function add(n,m) result(b)
implicit none
include 'AB.inc'
b = n + m
end function add
|
68834b87a1a57d3c057b0c6f0e8aa732ac2e08d6f85c0aa2e4d8f9bd782e5d8b | Fortran | 98 | 4 | subroutine foo(x)
real(8), intent(in) :: x
! Écrit à l'écran la valeur de x
end subroutine
|
08c40be5159ff4b2a79d40e24be2186bdc5cf4319a9c262b68dab4bc69ae9ce1 | Fortran | 100 | 5 | subroutine inquire_next(IU)
IMPLICIT NONE
integer :: IU
!f2py intent(in) IU
end subroutine
|
e355ba22b7bee708c94d383aa00a3b3b55997ddd5483dbef36d3601d2e4c8445 | Fortran | 101 | 4 | integer function intproduct(a, b) result(res)
integer, intent(in) :: a, b
res = a*b
end function
|
82f40923336dbda716134761cacc67df4fa251e23ae47a6aec3884f6845abb3f | Fortran | 105 | 6 | module test
abstract interface
subroutine foo()
end subroutine
end interface
end module test
|
09a1fb9a75931bb15c9c97b6bd737fd330db31a770e8d0aa2be249d879838caf | Fortran | 128 | 6 | module foo
type bar
character(len = 4) :: text
end type bar
type(bar), parameter :: abar = bar('abar')
end module foo
|
af4f097935664d313103e85867a1f36b1570067d4631b3c0baec018410ed2549 | Fortran | 130 | 4 | module precision
integer, parameter :: rk = selected_real_kind(8)
integer, parameter :: ik = selected_real_kind(4)
end module
|
7c843bd70ac1734d095005548ffaf7405f5275e36788188cc3a2f2ec21a03d65 | Fortran | 139 | 8 | module foo_free
contains
subroutine bar13(a)
!f2py intent(out) a
integer a
a = 13
end subroutine bar13
end module foo_free
|
fcdae5d1ad878146edca6194d2dc1a27efbbacc6b551ca36037b306d6bc7a0ca | Fortran | 148 | 7 | function gh17797(f, y) result(r)
external f
integer(8) :: r, f
integer(8), dimension(:) :: y
r = f(0)
r = r + sum(y)
end function gh17797
|
7dd38f8518bb8a9ca0c1809771d6bba7f765af0b391ddd8696917d119faa9dc9 | Fortran | 157 | 7 | subroutine foo(is_, ie_, arr, tout)
implicit none
integer :: is_,ie_
real, intent(in) :: arr(is_:ie_)
real, intent(out) :: tout(is_:ie_)
tout = arr
end
|
798a49c0160b2863b155b2a012a7e7cb5ce789bf9beee621c5c45721feeec178 | Fortran | 165 | 10 | module foo
public
integer, private :: a
integer :: b
contains
subroutine setA(v)
integer, intent(in) :: v
a = v
end subroutine setA
end module foo
|
3e7c327f9e9077a5b71541fe64c8275c46246fb827d7ca6d3537709866a7d09a | Fortran | 167 | 10 | module foo
public
integer, private :: a
public :: setA
contains
subroutine setA(v)
integer, intent(in) :: v
a = v
end subroutine setA
end module foo
|
edbb9b6463089fb883df5c039231754e55c250cee768220aebd33d7747b7cbe5 | Fortran | 174 | 11 | module foo
private
integer :: a
public :: setA
integer :: b
contains
subroutine setA(v)
integer, intent(in) :: v
a = v
end subroutine setA
end module foo
|
002c55da2ea23c393e6ba2ff06ce23af254a6093041944e2b442184e36c97ace | Fortran | 176 | 9 | MODULE string_test
character(len=8) :: string
character string77 * 8
character(len=12), dimension(5,7) :: strarr
character strarr77(5,7) * 12
END MODULE string_test
|
5804e20c602808a9c680cce6fe232099f554d1428e425939166d225c298f0241 | Fortran | 179 | 6 | subroutine shift_a(dim_a, a)
use data, only: shift
integer, intent(in) :: dim_a
real(8), intent(inout), dimension(dim_a) :: a
a = a + shift
end subroutine shift_a
|
a712ae3f3c45dca9f9921c85abd6b20ac422a25c41dd268db5c59a2b98fa46fe | Fortran | 179 | 8 | module foo_fixed
contains
subroutine bar12(a)
!f2py intent(out) a
integer a
a = 12
end subroutine bar12
end module foo_fixed
|
f54cfc08707d8b7fe68c2ddc4ce9a44e03c0179b564b061a706dcc52b53e498d | Fortran | 180 | 8 | module data
real(8) :: shift
contains
subroutine set_shift(in_shift)
real(8), intent(in) :: in_shift
shift = in_shift
end subroutine set_shift
end module data
|
242d057d55ec9c1da56476fe9c66f24a7c6fffd5470320f498a68b0e8c1ccc55 | Fortran | 190 | 9 | module fortfuncs
implicit none
contains
subroutine square(x,y)
integer, intent(in), value :: x
integer, intent(out) :: y
y = x*x
end subroutine square
end module fortfuncs
|
0547a3ca1aa93557c764743e402ee8ed94a8ee543a607c97d3c952990aace983 | Fortran | 193 | 10 | module typedefmod
use iso_fortran_env, only: real32
end module typedefmod
module data
use typedefmod, only: real32
implicit none
real(kind=real32) :: x
common/test/x
end module data
|
f93a7d29dd5abef33b008afc66e90503d455afec2eb338809c4f00bc6f50408e | Fortran | 197 | 7 | subroutine string_inout_optional(output)
implicit none
character*(32), optional, intent(inout) :: output
if (present(output)) then
output="output string"
endif
end subroutine
|
d6ffa13024ff2bba6b8616a6a0cdb49cc53dcc82da9bce07afe8a6724fdd6189 | Fortran | 205 | 11 | module test_bug
implicit none
private
public :: intproduct
contains
integer function intproduct(a, b) result(res)
integer, intent(in) :: a, b
res = a*b
end function
end module
|
fb90e29fb6256354d4eed5070f6a7efc3493c460690ec59835e4fd58ec06867a | Fortran | 208 | 13 | module foo
public
type, private, bind(c) :: a
integer :: i
end type a
type, bind(c) :: b_
integer :: j
end type b_
public :: b_
type :: c
integer :: k
end type c
end module foo
|
b436777d495accb2fc4e1266dd5c0d189ef940894b716ef4367305bfe240e16d | Fortran | 224 | 12 | module mod
integer :: i
integer :: x(4)
real, dimension(2,3) :: a
real, allocatable, dimension(:,:) :: b
contains
subroutine foo
integer :: k
k = 1
a(1,2) = a(1,2)+3
end subroutine foo
end module mod
|
ae64fd9388cff51bb53cb706a9ea70f4973a3fd5cd5ccd1ac58ee8e218bd954c | Fortran | 269 | 19 | subroutine sum_with_use(x, res)
use precision
implicit none
real(kind=rk), intent(in) :: x(:)
real(kind=rk), intent(out) :: res
integer :: i
!print *, "size(x) = ", size(x)
res = 0.0
do i = 1, size(x)
res = res + x(i)
enddo
end subroutine
|
fd6d5f8f4c172ea4fdd50d78aa906733717bac929a89247cba97b4991ebf3881 | Fortran | 276 | 9 | SUBROUTINE TESTSUB(INPUT1, & ! Hello
! commenty
INPUT2, OUTPUT1, OUTPUT2) ! more comments
INTEGER, INTENT(IN) :: INPUT1, INPUT2
INTEGER, INTENT(OUT) :: OUTPUT1, OUTPUT2
OUTPUT1 = INPUT1 + &
INPUT2
OUTPUT2 = INPUT1 * INPUT2
END SUBROUTINE TESTSUB
|
0a91e980cadfd1ba80d56dcece8def2270f3d113fdd384bb2e4a5d007e8e0dc9 | Fortran | 277 | 9 | ! Check that intent(in out) translates as intent(inout).
! The separation seems to be a common usage.
subroutine foo(x)
implicit none
real(4), intent(in out) :: x
dimension x(3)
x(1) = x(1) + x(2) + x(3)
return
end
|
80f35ab31f7c4887fb67d89b93f0c7886282be5ec446db1fa065e21434fb15b3 | Fortran | 282 | 13 | subroutine gh2848( &
! first 2 parameters
par1, par2,&
! last 2 parameters
par3, par4)
integer, intent(in) :: par1, par2
integer, intent(out) :: par3, par4
par3 = par1
par4 = par2
end subroutine gh2848
|
889083f1af0c5139ae3ee79d6dc9b15b9e0daf86a562e2e192c05ed6c1d2e0ad | Fortran | 298 | 9 | subroutine func1(n, x, res)
use, intrinsic :: iso_fortran_env, only: int64, real64
implicit none
integer(int64), intent(in) :: n
real(real64), intent(in) :: x(n)
real(real64), intent(out) :: res
!f2py intent(hide) :: n
res = sum(x)
end
|
d84a71bc2fb4fdd039f0c05f19070bc87ce966029c31ffd6f5cef70bf32a9e89 | Fortran | 304 | 14 | subroutine charint(trans, info)
character, intent(in) :: trans
integer, intent(out) :: info
if (trans == 'N') then
info = 1
else if (trans == 'T') then
info = 2
else if (trans == 'C') then
info = 3
else
info = -1
end if
end subroutine charint
|
2d60c94d8477b7d87522caca0bc7555d99417d65fb7252de534d3a5fa3b0f282 | Fortran | 332 | 20 | module gh23879
implicit none
private
public :: foo
contains
subroutine foo(a, b)
integer, intent(in) :: a
integer, intent(out) :: b
b = a
call bar(b)
end subroutine
subroutine bar(x)
integer, intent(inout) :: x
x = 2*x
end subroutine
end mod... |
cc81e9c3529d9166d3cdb5dbef784f6c28383761ed8f75cbf0323033bb1e5e9a | Fortran | 347 | 20 |
subroutine selectedrealkind(p, r, res)
implicit none
integer, intent(in) :: p, r
!f2py integer :: r=0
integer, intent(out) :: res
res = selected_real_kind(p, r)
end subroutine
subroutine selectedintkind(p, res)
implicit none
integer, intent(in) :: p
integer, intent(out) :: res
res = selected_i... |
6db9caa43b0eb825a5ba8368771cc2b295109eed7af73293b27e1f2d3921c293 | Fortran | 364 | 12 | module utils
implicit none
contains
subroutine my_abort(message)
implicit none
character(len=*), intent(in) :: message
!f2py callstatement PyErr_SetString(PyExc_ValueError, message);f2py_success = 0;
!f2py callprotoargument char*
write(0,*) "THIS SHOULD NOT APPEAR"
stop 1
... |
f5c56f97cce502e1a2a9b487305cc59fa68d5978f6bfbb0725d77d03539cd2a8 | Fortran | 392 | 17 | module datonly
implicit none
integer, parameter :: max_value = 100
real, dimension(:), allocatable :: data_array
end module datonly
module dat
implicit none
integer, parameter :: max_= 1009
end module dat
subroutine simple_subroutine(ain, aout)
use dat, only: max_
integer, intent(in) :: ain
integer, i... |
52c15fc7407682efed4be1fe0692d679dff2a0c0e5d646f274c20ecfc7ef5d60 | Fortran | 398 | 20 | module mathops
implicit none
contains
function add(a, b) result(c)
integer, intent(in) :: a, b
integer :: c
c = a + b
end function add
end module mathops
module useops
use mathops, only: add
implicit none
contains
function sum_and_double(a, b) result(d)
integer, intent(in) :: a, b
integ... |
73b554e126cadf25a7fbac24b0fded0f1fc7c61e6efe0f149e50e98d4ffeb418 | Fortran | 402 | 21 | module mod2
implicit none
private mod2_func1
contains
subroutine mod2_func1()
print*, "mod2_func1"
end subroutine mod2_func1
end module mod2
module mod1
implicit none
private :: mod1_func1
contains
subroutine mod1_func1()
... |
78453b46014f87e4e735712e24576d2664c5fb03e7a5b1cb4211b87c47899da8 | Fortran | 403 | 21 | module mod2
implicit none
PUBLIC :: mod2_func1
contains
subroutine mod2_func1()
print*, "mod2_func1"
end subroutine mod2_func1
end module mod2
module mod1
implicit none
PUBLIC :: mod1_func1
contains
subroutine mod1_func1()
... |
a01c1b19295bafd3241728553b66a5763734d5dafd187accad289141e93c53ae | Fortran | 460 | 34 |
subroutine sum(x, res)
implicit none
real, intent(in) :: x(:)
real, intent(out) :: res
integer :: i
!print *, "sum: size(x) = ", size(x)
res = 0.0
do i = 1, size(x)
res = res + x(i)
enddo
end subroutine sum
function fsum(x) result (res)
implicit none
real, intent(in) :: x(:)
real :: res... |
adeee97f372e6aaba23a26b9dd44fba8d36b4d8bb67ae18a385e088682e64fa8 | Fortran | 469 | 15 | ! Check that parameters are correct intercepted.
! Constants with comma separations are commonly
! used, for instance Pi = 3._dp
subroutine foo_compound_int(x)
implicit none
integer, parameter :: ii = selected_int_kind(9)
integer(ii), intent(inout) :: x
dimension x(3)
integer(ii), parameter :: three = 3_ii
... |
adfcf0dd0748f9e6834a5fa1b250a01a9779b477ed24e5615ef6f6d58f467fa3 | Fortran | 499 | 41 |
module mod
contains
subroutine sum(x, res)
implicit none
real, intent(in) :: x(:)
real, intent(out) :: res
integer :: i
!print *, "sum: size(x) = ", size(x)
res = 0.0
do i = 1, size(x)
res = res + x(i)
enddo
end subroutine sum
function fsum(x) result (res)
implicit none
real, intent(in)... |
36b68ec8a217cafbff63edf11a79938ed3635b6667b27964f0056223ccdfa2f7 | Fortran | 506 | 17 | ! When gh18335_workaround is defined as an extension,
! the issue cannot be reproduced.
!subroutine gh18335_workaround(f, y)
! implicit none
! external f
! integer(kind=1) :: y(1)
! call f(y)
!end subroutine gh18335_workaround
function gh18335... |
f9c0faf71ee89a4e70bd5b1f307957899fa94dc6b1b36065e46f461c0e142763 | Fortran | 566 | 18 | module utils
implicit none
contains
subroutine my_abort(message)
implicit none
character(len=*), intent(in) :: message
!f2py callstatement PyErr_SetString(PyExc_ValueError, message);f2py_success = 0;
!f2py callprotoargument char*
write(0,*) "THIS SHOULD NOT APPEAR"
stop 1
... |
73d46f50fd69436d353bfcce5e0574c69fda245ffc965c6e03c528b7dcf9b6bd | Fortran | 608 | 25 | MODULE MOD_TYPES
INTEGER, PARAMETER :: SP = SELECTED_REAL_KIND(6, 37)
INTEGER, PARAMETER :: DP = SELECTED_REAL_KIND(15, 307)
END MODULE
!
MODULE F_GLOBALS
USE MOD_TYPES
IMPLICIT NONE
INTEGER, PARAMETER :: N_MAX = 16
INTEGER, PARAMETER :: I_MAX = 18
... |
21cc444952ca25467593db982a849bf077e6f7e3bfe2b567964894536762cbc4 | Fortran | 609 | 23 | ! Check that parameters are correct intercepted.
! Specifically that types of constants without
! compound kind specs are correctly inferred
! adapted Gibbs iteration code from pymc
! for this test case
subroutine foo_non_compound_int(x)
implicit none
integer, parameter :: ii = selected_int_kind(9)
integer(ii... |
aae35b0ec3354ecdab3785ad3ceebb4bd5e2ffc97671769b5913b4d023d04924 | Fortran | 610 | 23 | ! Check that parameters are correct intercepted.
! Constants with comma separations are commonly
! used, for instance Pi = 3._dp
subroutine foo_single(x)
implicit none
integer, parameter :: rp = selected_real_kind(6)
real(rp), intent(inout) :: x
dimension x(3)
real(rp), parameter :: three = 3._rp
x(1) = x(1... |
9c498c2e2b4aa12006ee00411102d6ba6a2037e292dc305938064959c4839c5c | Fortran | 612 | 22 | ! Check that parameters are correct intercepted.
! Constants with comma separations are commonly
! used, for instance Pi = 3._dp
subroutine foo_int(x)
implicit none
integer, parameter :: ii = selected_int_kind(9)
integer(ii), intent(inout) :: x
dimension x(3)
integer(ii), parameter :: three = 3_ii
x(1) = x(... |
8a1aff047f6563b797710a471c342116829c6eeed530e5f940fd9396bef195a3 | Fortran | 618 | 29 | MODULE char_test
CONTAINS
SUBROUTINE change_strings(strings, n_strs, out_strings)
IMPLICIT NONE
! Inputs
INTEGER, INTENT(IN) :: n_strs
CHARACTER, INTENT(IN), DIMENSION(2,n_strs) :: strings
CHARACTER, INTENT(OUT), DIMENSION(2,n_strs) :: out_strings
!f2py INTEGER, INTENT(IN) :: n_strs
!f2py CHARAC... |
245536c3df1c07f5cdc1faea36d234c834e6a4477160efd4125da9808feb9edf | Fortran | 658 | 34 | module ops_module
abstract interface
subroutine op(x, y, z)
integer, intent(in) :: x, y
integer, intent(out) :: z
end subroutine
end interface
contains
subroutine foo(x, y, r1, r2)
integer, intent(in) :: x, y
integer, intent(out) :: r1, r2
procedure (op) add1, add2
procedure... |
d7d60eece1a3d0892cc8196630b64644140b8e81377ab7e4478b45be1ce7bef1 | Fortran | 693 | 20 | ! gh-23276
module cmplxdat
implicit none
integer :: i, j
real :: x, y
real, dimension(2) :: z
real(kind=8) :: pi
complex(kind=8), target :: medium_ref_index
complex(kind=8), target :: ref_index_one, ref_index_two
complex(kind=8), dimension(2) :: my_array
real(kind=8), dimension(3) :: my_real_array = (... |
e67e8892e01214a8182025d8f5fa02568aa775f018d004191442bc2fc0110463 | Fortran | 695 | 34 | function sint(s) result(i)
implicit none
character(len=*) :: s
integer :: j, i
i = 0
do j=len(s), 1, -1
if (.not.((i.eq.0).and.(s(j:j).eq.' '))) then
i = i + ichar(s(j:j)) * 10 ** (j - 1)
endif
end do
return
end function sint
function test_in_bytes4(a) result (i)
implicit none
... |
22514041acf0051af7cf24fbbf7ebeb55d3e7d7b41d5ded6169e92d4954cb2d8 | Fortran | 815 | 44 |
subroutine foo(a, n, m, b)
implicit none
real, intent(in) :: a(n, m)
integer, intent(in) :: n, m
real, intent(out) :: b(size(a, 1))
integer :: i
do i = 1, size(b)
b(i) = sum(a(i,:))
enddo
end subroutine
subroutine trans(x,y)
implicit none
real, intent(in), dimension(:,:) :: x
real, intent(o... |
8dcc3e7f3ac5874c3953aeae2587de516e20bfde0be4c9d643f369b15f72d282 | Fortran | 998 | 34 | module coddity
use iso_c_binding, only: c_double, c_int, c_int64_t
implicit none
contains
subroutine c_add(a, b, c) bind(c, name="c_add")
real(c_double), intent(in) :: a, b
real(c_double), intent(out) :: c
c = a + b
end subroutine c_add
! gh-9693
function wa... |
f8573eaa35b5c01af70e4bdd77974c4ebb748678e757ed40628f8d156730152a | Fortran | 1,184 | 49 | module foo
type bar
character(len = 32) :: item
end type bar
interface operator(.item.)
module procedure item_int, item_real
end interface operator(.item.)
interface operator(==)
module procedure items_are_equal
end interface operator(==)
interface assignment(=)
module procedure get_in... |
819b87e658f6946ea0a87947efae8a437278f84ae8f86e16a4e3a8d8c1b7a215 | Fortran | 1,194 | 48 | module f90_return_real
contains
function t0(value)
real :: value
real :: t0
t0 = value
end function t0
function t4(value)
real(kind=4) :: value
real(kind=4) :: t4
t4 = value
end function t4
function t8(value)
real(kind=8... |
735067aed5b02f6764ad3afbc2f944a8d0e0e7d49e34ca3783226e19d470703c | Fortran | 1,238 | 48 | module f90_return_complex
contains
function t0(value)
complex :: value
complex :: t0
t0 = value
end function t0
function t8(value)
complex(kind=4) :: value
complex(kind=4) :: t8
t8 = value
end function t8
function t16(value)
... |
50b7044c312dee05c74739ac3213ec186e28de51ab731f85105689b0f1852b20 | Fortran | 1,248 | 48 | module f90_return_char
contains
function t0(value)
character :: value
character :: t0
t0 = value
end function t0
function t1(value)
character(len=1) :: value
character(len=1) :: t1
t1 = value
end function t1
function t5(value)
... |
29183b1a6abfaf707bb7720481190fd454fcbdef00b941564f459c4e55e83795 | Fortran | 1,468 | 45 | ! Check that parameter arrays are correctly intercepted.
subroutine foo_array(x, y, z)
implicit none
integer, parameter :: dp = selected_real_kind(15)
integer, parameter :: pa = 2
integer, parameter :: intparamarray(2) = (/ 3, 5 /)
integer, dimension(pa), parameter :: pb = (/ 2, 10 /)
integer, parameter, di... |
6f3c5b62da1f8af191607df902783d49c9db36c54444df3eeae6f9f9e23e2c64 | Fortran | 1,531 | 59 | module f90_return_integer
contains
function t0(value)
integer :: value
integer :: t0
t0 = value
end function t0
function t1(value)
integer(kind=1) :: value
integer(kind=1) :: t1
t1 = value
end function t1
function t2(value)
... |
f4a9827bbc896298b87ed90a38cdc10839cf39d04f4db50dacac58de9dfb3b5e | Fortran | 1,531 | 59 | module f90_return_logical
contains
function t0(value)
logical :: value
logical :: t0
t0 = value
end function t0
function t1(value)
logical(kind=1) :: value
logical(kind=1) :: t1
t1 = value
end function t1
function t2(value)
... |
f9b05fd9ea876feb85c60a3a43b880b55514433ac616ace11c335ac7048809f4 | Fortran | 1,939 | 57 | ! Check that parameters are correct intercepted.
! Constants with comma separations are commonly
! used, for instance Pi = 3._dp
subroutine foo(x)
implicit none
integer, parameter :: sp = selected_real_kind(6)
integer, parameter :: dp = selected_real_kind(15)
integer, parameter :: ii = selected_int_kind(9)
in... |
1dff1f08cc12b8ddabcf2eb9c73a50b2293cbd5dd1419c3aaa85e2d8fc520462 | Fortran | 18,972 | 857 | ! Author: Sarthak Gupta
! Contact : guptasarthak50@gmail.com
! This code takes equillibrated system
! Chromatin+Shell+Linkages+Crosslinkers
! and compress the system with parallel plates
! at tunable compression rates and strains
! Algorithim for compression
! 1) Read the coordinates from the files
! 2) Set the bound... |
faaa225ad84c353ac9d0b2116470778733bde10756f827850dd57de03314b5a3 | Java | 165 | 9 | package org.pytorch;
interface INativePeer {
void resetNative();
IValue forward(IValue... inputs);
IValue runMethod(String methodName, IValue... inputs);
}
|
3b02a273b299cfc09c9ef57174a0300b31cbf83a73cee02cdf200eaf5040a667 | Java | 200 | 14 | package org.pytorch;
public enum MemoryFormat {
CONTIGUOUS(1),
CHANNELS_LAST(2),
CHANNELS_LAST_3D(3),
;
final int jniCode;
MemoryFormat(int jniCode) {
this.jniCode = jniCode;
}
}
|
2a9fc0803f03fec85f28e936ed5d3d133a1b17533b75e3680b18a1da99e0eab6 | Java | 260 | 9 | package org.pytorch.suite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.pytorch.PytorchInstrumentedTests;
@RunWith(Suite.class)
@Suite.SuiteClasses({PytorchInstrumentedTests.class})
public class PytorchInstrumentedTestSuite {}
|
a83ce098d156d3246653f01fc876a7ffca34a80478601136e0a1d518440edabf | Java | 261 | 15 | package org.pytorch;
public enum Device {
// Must be in sync with kDeviceCPU, kDeviceVulkan in
// pytorch_android/src/main/cpp/pytorch_jni_lite.cpp
CPU(1),
VULKAN(2),
;
final int jniCode;
Device(int jniCode) {
this.jniCode = jniCode;
}
}
|
9a613d2c88f4746c838383600bfdd940878a8b3e618feea0e2f178369653a29f | Java | 272 | 9 | package org.pytorch.suite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.pytorch.PytorchLiteInstrumentedTests;
@RunWith(Suite.class)
@Suite.SuiteClasses({PytorchLiteInstrumentedTests.class})
public class PytorchLiteInstrumentedTestSuite {}
|
67bd8c94ef3a3807be43069b1db3aecfe5cfa609a6c50d59ef2cad8eed32a144 | Java | 296 | 9 | package org.pytorch.torchvision.suite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.pytorch.torchvision.TorchVisionInstrumentedTests;
@RunWith(Suite.class)
@Suite.SuiteClasses({TorchVisionInstrumentedTests.class})
public class TorchVisionInstrumentedTestSuite {}
|
e364b71481a1a41c436bf816abd2ef3aec070d1f5b4fdc2cf3f997e41b03f6d2 | Java | 387 | 16 | package org.pytorch;
import com.facebook.soloader.nativeloader.NativeLoader;
public class PyTorchCodegenLoader {
public static void loadNativeLibs() {
try {
NativeLoader.loadLibrary("torch-code-gen");
} catch (Throwable t) {
// Loading the codegen lib is best-effort since it's only there for qu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.