Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for Sizeof (0.17 sec)

  1. tensorflow/c/c_test_util.cc

          TF_AllocateTensor(TF_INT32, dims, num_dims, sizeof(int32_t) * num_values);
      memcpy(TF_TensorData(t), values, sizeof(int32_t) * num_values);
      return t;
    }
    
    TF_Tensor* Int32Tensor(const std::vector<int32_t>& values) {
      int64_t dims = values.size();
      return Int32Tensor(&dims, 1, values.data());
    }
    
    TF_Tensor* Int32Tensor(int32_t v) {
      const int num_bytes = sizeof(int32_t);
      int32_t* values = new int32_t[1];
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  2. src/test/java/org/codelibs/fess/util/MemoryUtilTest.java

            assertEquals(24L, MemoryUtil.sizeOf(Byte.MAX_VALUE));
            assertEquals(16L, MemoryUtil.sizeOf(Boolean.TRUE));
            assertEquals(32L, MemoryUtil.sizeOf(new Date()));
            assertEquals(80L, MemoryUtil.sizeOf(LocalDateTime.now()));
            assertEquals(2128L, MemoryUtil.sizeOf(ZonedDateTime.now()));
            assertEquals(66L, MemoryUtil.sizeOf("1234567890"));
            assertEquals(76L, MemoryUtil.sizeOf("12345678901234567890"));
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/modular_filesystem.cc

            "SetConfiguration() needs number of values > 0");
      }
    
      TF_Filesystem_Option option;
      memset(&option, 0, sizeof(option));
      option.name = const_cast<char*>(name.c_str());
      TF_Filesystem_Option_Value option_value;
      memset(&option_value, 0, sizeof(option_value));
      option_value.type_tag = TF_Filesystem_Option_Type_Buffer;
      option_value.num_values = values.size();
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/util/MemoryUtil.java

                long size = 0;
                for (final Object value : (Object[]) obj) {
                    size += sizeOf(value);
                }
                return size;
            }
            if (obj instanceof Collection<?>) {
                long size = 0;
                for (final Object value : (Collection<?>) obj) {
                    size += sizeOf(value);
                }
                return size;
            }
            if (obj instanceof Map<?, ?>) {
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_test_util.cc

      int64_t dims[] = {2, 2};
      double data[] = {1.0, 2.0, 3.0, 4.0};
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_DOUBLE, &dims[0],
                                            sizeof(dims) / sizeof(int64_t), status);
      memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  6. src/cmd/cgo/internal/test/callback_c.c

    #include <string.h>
    
    #include "_cgo_export.h"
    
    void
    callback(void *f)
    {
    	// use some stack space
    	volatile char data[64*1024];
    
    	data[0] = 0;
    	goCallback(f);
            data[sizeof(data)-1] = 0;
    }
    
    void
    callGoFoo(void)
    {
    	extern void goFoo(void);
    	goFoo();
    }
    
    void
    IntoC(void)
    {
    	BackIntoGo();
    }
    
    void
    Issue1560InC(void)
    {
    	Issue1560FromC();
    }
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 933 bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_unified_experimental_test.cc

        [[0,0],    *   [[0,0],    =   [[0,0],
         [0,0]]         [0,0]]         [0,0]]
      */
    
      // Build an abstract input tensor.
      int64_t dims[] = {2, 2};  // Matrices will be 2 x 2
      int num_dims = sizeof(dims) / sizeof(dims[0]);
    
      float vals[] = {0.0f, 0.0f, 0.0f, 0.0f};
      TFE_Context* eager_ctx = TF_ExecutionContextGetTFEContext(ctx, status.get());
      TFE_TensorHandle* t =
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
  8. cmd/os-dirent_namelen_linux.go

    package cmd
    
    import (
    	"bytes"
    	"fmt"
    	"syscall"
    	"unsafe"
    )
    
    func direntNamlen(dirent *syscall.Dirent) (uint64, error) {
    	const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name))
    	nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0]))
    	const nameBufLen = uint16(len(nameBuf))
    	limit := dirent.Reclen - fixedHdr
    	if limit > nameBufLen {
    		limit = nameBufLen
    	}
    	// Avoid bugs in long file names
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  9. cmd/os_unix.go

    func parseDirEnt(buf []byte) (consumed int, name []byte, typ os.FileMode, err error) {
    	// golang.org/issue/15653
    	dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0]))
    	if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v {
    		return consumed, nil, typ, fmt.Errorf("buf size of %d smaller than dirent header size %d", len(buf), v)
    	}
    	if len(buf) < int(dirent.Reclen) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  10. src/archive/zip/writer.go

    		// if modification time is the only timestamp being encoded.
    		var mbuf [9]byte // 2*SizeOf(uint16) + SizeOf(uint8) + SizeOf(uint32)
    		mt := uint32(fh.Modified.Unix())
    		eb := writeBuf(mbuf[:])
    		eb.uint16(extTimeExtraID)
    		eb.uint16(5)  // Size: SizeOf(uint8) + SizeOf(uint32)
    		eb.uint8(1)   // Flags: ModTime
    		eb.uint32(mt) // ModTime
    		fh.Extra = append(fh.Extra, mbuf[:]...)
    	}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
Back to top