- 博客(34)
- 资源 (215)
- 问答 (3)
- 收藏
- 关注
原创 Java游戏:FlappyBird源代码
/*2017/7/23https://www.youtube.com/watch?v=DO2zW365CEg*/import java.awt.Graphics;//import java.util.Timer;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.
2017-09-27 22:21:16 2860 3
原创 基于OpenMP的二维VTI介质一阶拟声波有限差分正演
#include#include#include#include#include "/home/Toa/hc/cjbsegy.h"#include "/home/Toa/hc/fft.c"#include "/home/Toa/hc/alloc.c"#include "/home/Toa/hc/complex.c"#ifdef _OPENMP#include #
2017-09-27 22:15:48 802
原创 Java实现Lagan法射线追踪GUI图形界面(软件)
import java.io.*;import java.awt.Color;import java.awt.Dimension;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.Insets;import javax.swing.JPanel;import javax.swing.JLabel;
2017-09-16 20:04:50 737
原创 Java实现二维VTI介质正演模拟GUI图形界面(软件)
import java.awt.Color;import java.awt.Dimension;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.Insets;import javax.swing.JPanel;import javax.swing.JLabel;import javax.swing
2017-09-16 19:57:08 879
原创 三维平滑
#include#include#include#include#include "/home/Toa/hc/cjbsegy.h"#include "/home/Toa/hc/fft.c"#include "/home/Toa/hc/alloc.c"#include "/home/Toa/hc/complex.c"void main(){ float ***vel; in
2017-09-09 12:08:28 1208
原创 基于MPI的二维VTI介质一阶拟声波方程有限差分地震正演模拟(一维数组)
//#########################################################//## 2D Acoustic VTI Medium Forward //## Ps : P + sv wave and get rid of sv //## Ron
2017-09-08 16:50:34 967
原创 基于MPI和CUDA的三维各向同性二阶声波方程有限差分地震正演模拟(差分部分来自Madagascar)
/*This is how to configure lines :#mpicc -o a test.c -lcudart -L/usr/local/cuda-7.5/lib64 -I/usr/local/cuda-7.5/includenvcc -o a Toa_gpu_3dFD.cu -I/home/leonvel/software/mpi/mpich/include -L/home
2017-09-08 16:48:18 2366 1
原创 基于MPI的三维各向同性一阶声波方程有限差分地震正演模拟
#include#include#include#include#include "mpi.h"#include "/home/Toa/hc/cjbsegy.h"#include "/home/Toa/hc/fft.c"#include "/home/Toa/hc/alloc.c"#include "/home/Toa/hc/complex.c"main(int argc,cha
2017-09-08 16:34:20 1369 4
原创 基于MPI的二维VTI介质二阶拟声波方程有限差分地震正演模拟
//#########################################################//## 2D Acoustic VTI Medium Forward //## Ps : P + sv wave and get rid of sv //## Ron
2017-09-08 16:28:18 999
原创 基于MPI的二维VTI介质一阶拟声波方程有限差分地震正演模拟
//#########################################################//## 2D Acoustic VTI Medium Forward //## Ps : P + sv wave and get rid of sv //## Ron
2017-09-08 16:26:47 742 1
原创 基于GPU加速的二维TTI介质一阶拟声波方程有限差分地震正演模拟
//a#########################################################//a## 2D Acoustic TTI Medium Forward //a## Ps : P + sv wave and get rid of sv //a## GPU(CUDA) //a##//a##/*a***
2017-09-08 16:23:36 857
原创 基于GPU加速的二维VTI介质一阶拟声波方程有限差分地震正演模拟
//a#########################################################//a## 2D Acoustic VTI Medium Forward //a## Ps : P + sv wave and get rid of sv //a## GPU(CUDA) //a##//a##/*a***
2017-09-08 16:21:54 750
原创 基于GPU加速的二维VTI介质二阶弹性波方程有限差分地震正演模拟
//a#########################################################//a## 2D Elastic VTI Medium Forward //a## Ps : P0 + sv wave and get rid of sv //a## GPU(CUDA) //a##//a##/*a***
2017-09-08 16:19:49 1299
原创 Linux 查看CPU信息
# 总核数 = 物理CPU个数 * 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 * 每颗物理CPU的核数 * 超线程数# 查看物理CPU个数cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l# 查看每个物理CPU中core的个数(即核数)cat /proc/cpuinfo| grep
2017-09-08 12:04:10 323
原创 Java native方法String转char*以及String[]转char**
JNIEXPORT void JNICALL Java_swap_swap_1float (JNIEnv *env, jclass cla, jstring in, jstring out) char *FN1; char *FN2; FN1 = (char*)(*env)->GetStringUTFChars(env,in,NULL);
2017-09-08 11:57:17 900
原创 Java String转int、float、double
int i;String s1="134";i=Integer.parseInt(s1);如果是float可以用强制类型转换。Float.parseFloat();Doubel.parseDouble();相反地:Integer.toString()
2017-09-08 11:55:46 12565
原创 Java输出数字到文本文件FileWriter
Writer rayfp = new FileWriter(raypath);rayfp.write(p_x+" "+p_z+" \n");rayfp.close();
2017-09-08 11:53:35 1224
转载 Java判断字符串是否为纯数字(0-9)
public static boolean isNumeric(String str){ / * Copyright: http://javapub.iteye.com/blog/666544 * / for (int i = 0; i < str.length(); i++){ if (!Charac
2017-09-08 11:52:42 7338
原创 Java的native方法返回数组return Array(C语言)
名为RungeKutta.c内的代码:float raypath_nray_xz_nt[nsx*na*2*nt];期间进行该c数组的计算申请java在C语言中的数组:jfloatArray farray = (*env)->NewFloatArray(env,nt*2*nsx*na);将C的数组拷贝到java的数组中:(*env)->SetFloatArrayRegion
2017-09-08 11:47:58 1344
原创 Java 好看的label-textfield(-button)布局
class myBorderJPanel extends JPanel{ private TitledBorder titledborder; private JPanel panel = new JPanel(); myBorderJPanel(String title, GridLayout gridlayout){
2017-09-08 11:39:00 1632
原创 基于GPU加速的三维VTI介质一阶拟声波方程有限差分地震正演模拟
//a#########################################################//a## 3D Acoustic VTI Medium Forward //a## //a## Ps :GPU(CUDA) //a##//a##/*a***************************//a##Function
2017-09-07 21:19:24 978
转载 Swap.java
public class Swap{ /* float */ public static float swap (float value){ int intValue = Float.floatToRawIntBits (value); intValue = swap (intValue);
2017-09-07 20:27:00 279 3
原创 Java与Cuda混合编程
基本上和Java与C语言混合编程(链接)相同,就是在生成动态库的编译过程不同。class NativeMethod{ public native void writefloat(int nx,int nz);}public class Main{ public static void main(String[] args){
2017-09-07 20:18:55 1926 4
原创 Java与C语言混合编程
Java提供了native关键字,该关键字用来声明本机代码方法。声明一个本机方法,在该方法之前用native修饰符,但是不要定义任何方法体。例如:public native int meth() ;很多本机方法是用C写的。把C代码结合到 Java 程序中的机制是调用。首先输入java短程序,使用了一个名为square的native方法: /*程序名为Main.java */p
2017-09-07 20:05:04 2636
原创 JavaSwing实现完整的菜单栏、工具栏和状态栏的GUI窗口
import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseListener;import java.awt.event.MouseAdapter;import java.awt.event.KeyEvent;import java.awt.event.
2017-09-07 20:02:20 13625
原创 Linux一些软件的安装
当然,最直接有效的方法是sudo安装(sudo apt-get install + softwarename)以下是一些软件的安装过程笔记,还希望有用吧!也给自己留个备份的,哈哈哈。1.sac/sac2000 install in: /opt/sac####################change the install position#############
2017-09-07 19:55:52 852
原创 psimage生成eps格式图片参数
psimage < **.dat n1=** width=** height=** perc=99 cmap=rgb1 \ wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0 title="***" > ***.epspsimage < vel101101final1.dat n1=101 d1=
2017-09-07 19:53:48 1316
原创 SeismicUnix加source-receiver数据加道头
#!/bin/shsuaddhead < shot.dat ns=$nt |sushw key=sx a=$fs b=0 c=$ds j=$nx |sushw key=gx a=$fg b=$dg c=0 j=$nx |suchw key1=offset key2=sx key3=gx b=-1
2017-09-07 19:52:26 1184
原创 Gtk的entry传递数据到内部程序
需要两个程序,其中main函数在gtk程序中,而在这个main函数中调用外界函数,从而实现对外界函数的可视化。 这里需要注意,当交换数据大于1时,再利用g_signal_connect(G_OBJECT(word),"clicked",G_CALLBACK(write_txt),NULL);进行数据传递过程则只能传递一个gpointer,仔细考虑一下,则可以用全局变量进行数据传递,如下
2017-09-07 19:45:57 1057
原创 Gtk实现GUI键盘并终端显示
整体思路:建立一个table,建立一个button,在对这个button处理后,按照table的(0,1,0,1)(左右上下)位置来嵌入button,注意的是,这里的button可以重复使用,就像接下来的程序中只用一个button就完成了整个键盘的按键。 利用gtk的table实现二维的button,button较多时编程比较繁琐。#include void callback( Gt
2017-09-07 19:42:12 873
原创 Cuda:invalid device pointer
cuda编程中调用一个判断cuda是否出错的函数如下:void check_gpu_error (const char *msg) { cudaError_t err = cudaGetLastError (); if (cudaSuccess != err) { printf("Cuda error: %s:
2017-09-07 19:39:33 2395
原创 Gtk与Cuda混合编程
大家都知道,不同的编译器有不同的-L和-I,而在编译过程中要实现两种编译器的混合使用,利用Makefile是一个很好地解决方案,比如之前在mpi与cuda混合编程中讨论的那样,基于图形界面的GTK编程也只是在gcc 编译的基础之上加上gtk的库函数(`pkg-config --cflags --libs gtk -2.0`)而已,所以通过本人的实际操作,用Makefile解决也是可以的。这里需要注
2017-09-07 19:34:39 584 2
原创 Gtk:利用alignment控制button大小
将button写入一个alignment里面,在对alignment进行操作 button=gtk_button_new_with_label("...");align = gtk_alignment_new(0,0.5,0,0); gtk_container_add(GTK_CONTAINER(align),button); g_signal_connect(G_OBJECT(bu
2017-09-06 22:00:45 2081
原创 Mpi与Cuda混合编程(Makefile)
需要建立一个.c的MPI程序和一个.cu的CUDA程序,MPI程序中调用CUDA中的函数来完成并行与GPU的混合编程,我查询了很多资料和博客,最终得出结论,还是Google比较强大,百度什么的还是搜不到完整的讲解MPI程序如下(文件名test.c)#include#include#include#include#include "mpi.h"void fun ( fl
2017-09-06 21:38:59 5001 2
C语言设计模式 PDF《C Design Pattern》
2024-04-17
C, GNUC GCC 预处理《The C Preprocessor》
2024-04-16
User Guide: Open Build Service
2022-05-13
CentOS Stream 9 nasm 安装包
2022-05-01
CentOS Stream 9 nasm 源码包
2022-05-01
Optimizing Linux Kernel with BOLT.pdf
2022-01-21
red_hat_enterprise_linux-8-customizing_anaconda-en-us.pdf
2022-01-18
cclinux-coreos-34.20211111.3.0-live.x86_64.iso
2021-11-11
Ftrace Kernel Hooks-More than just tracing.pdf
2021-10-22
cpumemory-What Every Programmer Should Know About Memory.pdf
2021-09-10
architecture-instruction-set-extensions-programming-reference
2021-09-10
System V Application Binary Interface - AMD64 Architecture
2021-09-10
Hidden Linux Metrics with Prometheus eBPF Exporter.pdf
2021-09-03
e2ap-v01.00.00.asn
2021-08-25
Intel 64 and IA-32 Architectures Software Developer’s Manual Combined
2021-07-07
谈谈你对Container Linux容器操作系统的理解
2021-11-14
Linux“实时补丁”导致CPU无法占满运行
2021-02-22
C语言如何将字符串“int”转化为int类型
2019-01-09
TA创建的收藏夹 TA关注的收藏夹
TA关注的人