torch_tensor_from_array_int32_4d_default_layout Subroutine

public subroutine torch_tensor_from_array_int32_4d_default_layout(tensor, data_in, device_type, device_index, requires_grad)

Uses

  • proc~~torch_tensor_from_array_int32_4d_default_layout~~UsesGraph proc~torch_tensor_from_array_int32_4d_default_layout torch_tensor_from_array_int32_4d_default_layout iso_c_binding iso_c_binding proc~torch_tensor_from_array_int32_4d_default_layout->iso_c_binding iso_fortran_env iso_fortran_env proc~torch_tensor_from_array_int32_4d_default_layout->iso_fortran_env

Return a Torch tensor pointing to data_in array of rank 4 containing data of type int32 with default layout [1, 2, ..., n].

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer(kind=c_int), intent(in) :: device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer, intent(in), optional :: device_index

Device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor


Calls

proc~~torch_tensor_from_array_int32_4d_default_layout~~CallsGraph proc~torch_tensor_from_array_int32_4d_default_layout torch_tensor_from_array_int32_4d_default_layout interface~torch_tensor_from_array torch_tensor_from_array proc~torch_tensor_from_array_int32_4d_default_layout->interface~torch_tensor_from_array interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_4d_default_layout proc~torch_tensor_from_array_int16_1d torch_tensor_from_array_int16_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_1d proc~torch_tensor_from_array_int16_1d_default_layout torch_tensor_from_array_int16_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_1d_default_layout proc~torch_tensor_from_array_int16_2d torch_tensor_from_array_int16_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_2d proc~torch_tensor_from_array_int16_2d_default_layout torch_tensor_from_array_int16_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_2d_default_layout proc~torch_tensor_from_array_int16_3d torch_tensor_from_array_int16_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_3d proc~torch_tensor_from_array_int16_3d_default_layout torch_tensor_from_array_int16_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_3d_default_layout proc~torch_tensor_from_array_int16_4d torch_tensor_from_array_int16_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_4d proc~torch_tensor_from_array_int16_4d_default_layout torch_tensor_from_array_int16_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_4d_default_layout proc~torch_tensor_from_array_int16_5d torch_tensor_from_array_int16_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_5d proc~torch_tensor_from_array_int16_5d_default_layout torch_tensor_from_array_int16_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_5d_default_layout proc~torch_tensor_from_array_int32_1d torch_tensor_from_array_int32_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_1d proc~torch_tensor_from_array_int32_1d_default_layout torch_tensor_from_array_int32_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_1d_default_layout proc~torch_tensor_from_array_int32_2d torch_tensor_from_array_int32_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_2d proc~torch_tensor_from_array_int32_2d_default_layout torch_tensor_from_array_int32_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_2d_default_layout proc~torch_tensor_from_array_int32_3d torch_tensor_from_array_int32_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_3d proc~torch_tensor_from_array_int32_3d_default_layout torch_tensor_from_array_int32_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_3d_default_layout proc~torch_tensor_from_array_int32_4d torch_tensor_from_array_int32_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_4d proc~torch_tensor_from_array_int32_5d torch_tensor_from_array_int32_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_5d proc~torch_tensor_from_array_int32_5d_default_layout torch_tensor_from_array_int32_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_5d_default_layout proc~torch_tensor_from_array_int64_1d torch_tensor_from_array_int64_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_1d proc~torch_tensor_from_array_int64_1d_default_layout torch_tensor_from_array_int64_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_1d_default_layout proc~torch_tensor_from_array_int64_2d torch_tensor_from_array_int64_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_2d proc~torch_tensor_from_array_int64_2d_default_layout torch_tensor_from_array_int64_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_2d_default_layout proc~torch_tensor_from_array_int64_3d torch_tensor_from_array_int64_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_3d proc~torch_tensor_from_array_int64_3d_default_layout torch_tensor_from_array_int64_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_3d_default_layout proc~torch_tensor_from_array_int64_4d torch_tensor_from_array_int64_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_4d proc~torch_tensor_from_array_int64_4d_default_layout torch_tensor_from_array_int64_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_4d_default_layout proc~torch_tensor_from_array_int64_5d torch_tensor_from_array_int64_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_5d proc~torch_tensor_from_array_int64_5d_default_layout torch_tensor_from_array_int64_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_5d_default_layout proc~torch_tensor_from_array_int8_1d torch_tensor_from_array_int8_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_1d proc~torch_tensor_from_array_int8_1d_default_layout torch_tensor_from_array_int8_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_1d_default_layout proc~torch_tensor_from_array_int8_2d torch_tensor_from_array_int8_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_2d proc~torch_tensor_from_array_int8_2d_default_layout torch_tensor_from_array_int8_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_2d_default_layout proc~torch_tensor_from_array_int8_3d torch_tensor_from_array_int8_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_3d proc~torch_tensor_from_array_int8_3d_default_layout torch_tensor_from_array_int8_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_3d_default_layout proc~torch_tensor_from_array_int8_4d torch_tensor_from_array_int8_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_4d proc~torch_tensor_from_array_int8_4d_default_layout torch_tensor_from_array_int8_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_4d_default_layout proc~torch_tensor_from_array_int8_5d torch_tensor_from_array_int8_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_5d proc~torch_tensor_from_array_int8_5d_default_layout torch_tensor_from_array_int8_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_5d_default_layout proc~torch_tensor_from_array_real32_1d torch_tensor_from_array_real32_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_1d proc~torch_tensor_from_array_real32_1d_default_layout torch_tensor_from_array_real32_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_1d_default_layout proc~torch_tensor_from_array_real32_2d torch_tensor_from_array_real32_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_2d proc~torch_tensor_from_array_real32_2d_default_layout torch_tensor_from_array_real32_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_2d_default_layout proc~torch_tensor_from_array_real32_3d torch_tensor_from_array_real32_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_3d proc~torch_tensor_from_array_real32_3d_default_layout torch_tensor_from_array_real32_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_3d_default_layout proc~torch_tensor_from_array_real32_4d torch_tensor_from_array_real32_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_4d proc~torch_tensor_from_array_real32_4d_default_layout torch_tensor_from_array_real32_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_4d_default_layout proc~torch_tensor_from_array_real32_5d torch_tensor_from_array_real32_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_5d proc~torch_tensor_from_array_real32_5d_default_layout torch_tensor_from_array_real32_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_5d_default_layout proc~torch_tensor_from_array_real64_1d torch_tensor_from_array_real64_1d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_1d proc~torch_tensor_from_array_real64_1d_default_layout torch_tensor_from_array_real64_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_1d_default_layout proc~torch_tensor_from_array_real64_2d torch_tensor_from_array_real64_2d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_2d proc~torch_tensor_from_array_real64_2d_default_layout torch_tensor_from_array_real64_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_2d_default_layout proc~torch_tensor_from_array_real64_3d torch_tensor_from_array_real64_3d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_3d proc~torch_tensor_from_array_real64_3d_default_layout torch_tensor_from_array_real64_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_3d_default_layout proc~torch_tensor_from_array_real64_4d torch_tensor_from_array_real64_4d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_4d proc~torch_tensor_from_array_real64_4d_default_layout torch_tensor_from_array_real64_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_4d_default_layout proc~torch_tensor_from_array_real64_5d torch_tensor_from_array_real64_5d interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_5d proc~torch_tensor_from_array_real64_5d_default_layout torch_tensor_from_array_real64_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_5d_default_layout proc~torch_tensor_from_blob torch_tensor_from_blob proc~torch_tensor_from_array_int16_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int16_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int16_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int16_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int16_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int16_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int32_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int32_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int32_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int32_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int32_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int64_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int64_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int64_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int64_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int64_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int8_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int8_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int8_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int8_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_int8_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real32_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real32_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real32_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real32_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real32_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_1d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real64_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_2d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real64_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_3d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real64_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_4d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real64_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_5d->proc~torch_tensor_from_blob proc~torch_tensor_from_array_real64_5d_default_layout->interface~torch_tensor_from_array interface~torch_from_blob_c torch_from_blob_c proc~torch_tensor_from_blob->interface~torch_from_blob_c

Called by

proc~~torch_tensor_from_array_int32_4d_default_layout~~CalledByGraph proc~torch_tensor_from_array_int32_4d_default_layout torch_tensor_from_array_int32_4d_default_layout interface~torch_tensor_from_array torch_tensor_from_array proc~torch_tensor_from_array_int32_4d_default_layout->interface~torch_tensor_from_array interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_4d_default_layout proc~torch_tensor_from_array_int16_1d_default_layout torch_tensor_from_array_int16_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_1d_default_layout proc~torch_tensor_from_array_int16_2d_default_layout torch_tensor_from_array_int16_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_2d_default_layout proc~torch_tensor_from_array_int16_3d_default_layout torch_tensor_from_array_int16_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_3d_default_layout proc~torch_tensor_from_array_int16_4d_default_layout torch_tensor_from_array_int16_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_4d_default_layout proc~torch_tensor_from_array_int16_5d_default_layout torch_tensor_from_array_int16_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int16_5d_default_layout proc~torch_tensor_from_array_int32_1d_default_layout torch_tensor_from_array_int32_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_1d_default_layout proc~torch_tensor_from_array_int32_2d_default_layout torch_tensor_from_array_int32_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_2d_default_layout proc~torch_tensor_from_array_int32_3d_default_layout torch_tensor_from_array_int32_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_3d_default_layout proc~torch_tensor_from_array_int32_5d_default_layout torch_tensor_from_array_int32_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int32_5d_default_layout proc~torch_tensor_from_array_int64_1d_default_layout torch_tensor_from_array_int64_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_1d_default_layout proc~torch_tensor_from_array_int64_2d_default_layout torch_tensor_from_array_int64_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_2d_default_layout proc~torch_tensor_from_array_int64_3d_default_layout torch_tensor_from_array_int64_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_3d_default_layout proc~torch_tensor_from_array_int64_4d_default_layout torch_tensor_from_array_int64_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_4d_default_layout proc~torch_tensor_from_array_int64_5d_default_layout torch_tensor_from_array_int64_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int64_5d_default_layout proc~torch_tensor_from_array_int8_1d_default_layout torch_tensor_from_array_int8_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_1d_default_layout proc~torch_tensor_from_array_int8_2d_default_layout torch_tensor_from_array_int8_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_2d_default_layout proc~torch_tensor_from_array_int8_3d_default_layout torch_tensor_from_array_int8_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_3d_default_layout proc~torch_tensor_from_array_int8_4d_default_layout torch_tensor_from_array_int8_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_4d_default_layout proc~torch_tensor_from_array_int8_5d_default_layout torch_tensor_from_array_int8_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_int8_5d_default_layout proc~torch_tensor_from_array_real32_1d_default_layout torch_tensor_from_array_real32_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_1d_default_layout proc~torch_tensor_from_array_real32_2d_default_layout torch_tensor_from_array_real32_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_2d_default_layout proc~torch_tensor_from_array_real32_3d_default_layout torch_tensor_from_array_real32_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_3d_default_layout proc~torch_tensor_from_array_real32_4d_default_layout torch_tensor_from_array_real32_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_4d_default_layout proc~torch_tensor_from_array_real32_5d_default_layout torch_tensor_from_array_real32_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real32_5d_default_layout proc~torch_tensor_from_array_real64_1d_default_layout torch_tensor_from_array_real64_1d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_1d_default_layout proc~torch_tensor_from_array_real64_2d_default_layout torch_tensor_from_array_real64_2d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_2d_default_layout proc~torch_tensor_from_array_real64_3d_default_layout torch_tensor_from_array_real64_3d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_3d_default_layout proc~torch_tensor_from_array_real64_4d_default_layout torch_tensor_from_array_real64_4d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_4d_default_layout proc~torch_tensor_from_array_real64_5d_default_layout torch_tensor_from_array_real64_5d_default_layout interface~torch_tensor_from_array->proc~torch_tensor_from_array_real64_5d_default_layout proc~torch_tensor_from_array_int16_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int16_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int32_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int64_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_int8_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real32_5d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_1d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_2d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_3d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_4d_default_layout->interface~torch_tensor_from_array proc~torch_tensor_from_array_real64_5d_default_layout->interface~torch_tensor_from_array

Source Code

  subroutine torch_tensor_from_array_int32_4d_default_layout(tensor, data_in, &
                                                                       device_type, device_index, &
                                                                       requires_grad)
    use, intrinsic :: iso_c_binding, only : c_int
    use, intrinsic :: iso_fortran_env, only : int32

    ! output tensor
    type(torch_tensor), intent(out) :: tensor  !! Returned tensor

    ! inputs
    integer(kind=int32), intent(in), target :: data_in(:,:,:,:)  !! Input data that tensor will point at
    integer(c_int), intent(in)    :: device_type    !! Device type the tensor will live on (`torch_kCPU` or `torch_kCUDA`)
    integer, optional, intent(in) :: device_index   !! Device index to use for `torch_kCUDA` case
    logical, optional, intent(in) :: requires_grad  !! Whether gradients need to be computed for the created tensor

    ! local data
    integer(ftorch_int)       :: layout(4)  !! Order of indices
    integer(c_int), parameter :: ndims = 4  !! Number of dimension of input data
    integer :: i

    ! Set the default tensor layout
    do i = 1, ndims
      layout(i) = i
    end do

    call torch_tensor_from_array(tensor, data_in, layout, device_type, device_index, requires_grad)

  end subroutine torch_tensor_from_array_int32_4d_default_layout